Ad Widget

Collapse

Error with monitoring MongoDB with agent2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • studero
    Member
    • Aug 2023
    • 84

    #1

    Error with monitoring MongoDB with agent2

    Hi all,

    I have configured my MongoDB with authentification mode.
    Like as:
    db.createUser(
    {
    user: "zbx-mongo",
    pwd: "passwd",
    roles: [ { role: "root", db: "admin" } ]
    }
    )​

    Now, I have some error with some metrics, like "MongoDB node by Zabbix agent 2: MongoDB: Get server status: MongoDB: Memory: mapped : Memory" or "MongoDB node by Zabbix agent 2: MongoDB: Get server status: MongoDB: Memory: mapped with journal zz0.oyqzj9bgs3pzz : mapped" or "WiredTiger metrics: MongoDB: Get server status: MongoDB: WiredTiger cache: max page size at eviction​" with the following errors:
    - mongodb.mem.mapped_with_journal" became not supported: Cannot fetch data: (Unauthorized) command serverStatus requires authentication
    - Cannot fetch data: (Unauthorized) command serverStatus requires authentication.

    The variables macros {$MONGODB.PASSWORD} and {$MONGODB.USER} are setting.

    I need help​
    Last edited by studero; 04-10-2023, 08:48.
  • Baileykemp
    Junior Member
    • Sep 2023
    • 3

    #2
    You can ensure that the credentials you provided in the Zabbix configuration match the ones you set for the "zbx-mongo" user in MongoDB. Double-check the username and password for any typos or inconsistencies. If the credentials are correct, verify that the user has the necessary privileges to execute the "serverStatus" command and access the metrics you are trying to fetch. You can check the user's roles and permissions in MongoDB to ensure they have the appropriate access. UTSA Blackboard

    Comment

    • studero
      Member
      • Aug 2023
      • 84

      #3
      Originally posted by Baileykemp
      You can ensure that the credentials you provided in the Zabbix configuration match the ones you set for the "zbx-mongo" user in MongoDB. Double-check the username and password for any typos or inconsistencies. If the credentials are correct, verify that the user has the necessary privileges to execute the "serverStatus" command and access the metrics you are trying to fetch. You can check the user's roles and permissions in MongoDB to ensure they have the appropriate access. UTSA Blackboard
      Hi,

      The "zbx-mongo" user has the rool "root". So I think that is correct ?

      I need some help to execute the "serverStatus" command to made the verification ?

      Comment

      • studero
        Member
        • Aug 2023
        • 84

        #4
        Originally posted by Baileykemp
        You can ensure that the credentials you provided in the Zabbix configuration match the ones you set for the "zbx-mongo" user in MongoDB. Double-check the username and password for any typos or inconsistencies. If the credentials are correct, verify that the user has the necessary privileges to execute the "serverStatus" command and access the metrics you are trying to fetch. You can check the user's roles and permissions in MongoDB to ensure they have the appropriate access. UTSA Blackboard
        Hi again,

        I have found some informations about the command "serverStatus". I share you my output. I think that's work correctly.

        See attached file​
        Attached Files

        Comment

        • studero
          Member
          • Aug 2023
          • 84

          #5
          Originally posted by Baileykemp
          You can ensure that the credentials you provided in the Zabbix configuration match the ones you set for the "zbx-mongo" user in MongoDB. Double-check the username and password for any typos or inconsistencies. If the credentials are correct, verify that the user has the necessary privileges to execute the "serverStatus" command and access the metrics you are trying to fetch. You can check the user's roles and permissions in MongoDB to ensure they have the appropriate access. UTSA Blackboard
          Hi,

          Yesterday, I have remove the template MongoDB and his data. Then I have reapply the template with success. And the strange think is that they are no more error with the user/password.

          I have only one item with an error. This is "WiredTiger metrics: MongoDB: Get server status: MongoDB: WiredTiger cache: max page size at eviction" with the error "Preprocessing failed for: {"activeIndexBuilds":{"phases":{"commit":0,"dra inS ideWritesTable":0,"drainSideWritesTableOnCommit...
          1. Failed: cannot extract value from json by path "$.wiredTiger.cache['maximum page size at eviction']": no data matches the specified path"

          Do you have an idea ?​

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Code:
            1. Failed: cannot extract value from json by path "$.wiredTiger.cache['maximum page size at eviction']": no data matches the specified path"
            This means, that seemingly there is no such path in that json.. Either source does not show anything like it, or there is some minor mistake somewhere, like some capitalization error or something... You should try to obtain a full set of data that your main item is pulling and see, if it is there or what should be modified.

            Comment

            • studero
              Member
              • Aug 2023
              • 84

              #7
              Originally posted by cyber
              Code:
              1. Failed: cannot extract value from json by path "$.wiredTiger.cache['maximum page size at eviction']": no data matches the specified path"
              This means, that seemingly there is no such path in that json.. Either source does not show anything like it, or there is some minor mistake somewhere, like some capitalization error or something... You should try to obtain a full set of data that your main item is pulling and see, if it is there or what should be modified.
              Hi cyber,

              I need help to test manualy this check ?

              Comment

              Working...