Ad Widget

Collapse

Monitoring MongoDB? (mikoomi plugin)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robnc63
    Junior Member
    • Feb 2013
    • 3

    #16
    Ok, think I figured this out.

    If you change the mikoomi_mongodb_plugin.sh to the one I just posted you need to go into your zabbix GUI and go to your "Template_MongoDB", filter on Type: "External Check" and change the Key value to: mikoomi_mongodb_plugin.sh["{HOSTNAME}"]
    Configuration -> Templates -> "Template_MongoDB" -> Items

    Selected "Miscellaneous Data Collector" and edited the "Key" attribute:

    Original Key value:

    Code:
    mikoomi-mongodb-plugin.sh[-h {$MONGODB_HOSTNAME} -p {$MONGODB_PORT} -z {$MONGODB_ZABBIX_NAME} -u {$MONGODB_USER} -x {$MONGODB_PASS}]
    New Key value:

    Code:
    mikoomi_mongodb_plugin.sh["{HOSTNAME}"]
    Then saved settings.

    After doing this, the "No data received in 5 minutes" alert never clears.

    Is there a way to tell if Zabbix is actually running the script? Should the output of this script appear in the /tmp folder, as is the case when executing it manually? What am I missing?

    Comment

    • robnc63
      Junior Member
      • Feb 2013
      • 3

      #17
      Got it working (at last!)

      The following was found in the log file:

      HTML Code:
      sh: zabbix_sender: command not found
      zabbix_sender is called by the mikoomi-mongodb-plugin.php (near the end), and it was just a matter of fixing the script to point to the correct location (for my system--it may be different for someone else):

      Changed from:
      Code:
      exec("zabbix_sender -vv -z 127.0.0.1 -i $data_file_name 2>&1", $log_file_data) ;
      to:
      Code:
      exec("/usr/local/zabbix-agent/bin/zabbix_sender -vv -z 127.0.0.1 -i $data_file_name 2>&1", $log_file_data) ;
      Following this, the "No Data Received in 5 minutes" alert resolved, and all is now monitoring goodness.

      Comment

      • rahmathulla
        Junior Member
        • May 2013
        • 11

        #18
        Hi Guys,

        I have made all these changes but still it is showing the same error "No Data Received in 5 minutes"

        Comment

        • Sc0rian
          Junior Member
          • Jun 2011
          • 16

          #19
          zabbix_sender [4802]: DEBUG: answer [{

          "response":"success",

          "info":"Processed 0 Failed 169 Total 169 Seconds spent 0.002409"}]

          sent: 169; skipped: 0; total: 169


          thats all I get

          Comment

          • rahmathulla
            Junior Member
            • May 2013
            • 11

            #20
            Hi guys,

            I have amade all the changes as mentioned in this link,but the error no data recieved in last 5 minutes is not going.

            I have seen this in the zabbix agent log:

            3570:20130715:080933.779 refresh_active_checks('x.x.x.x',10051)
            23570:20130715:080933.781 Sending [{
            "request":"active checks",
            "host":"x.x.x.x"}]
            23570:20130715:080933.781 Before read
            23570:20130715:080933.787 Got [{
            "response":"success",
            "data":[]}]
            23570:20130715:080933.787 In parse_list_of_checks()

            And seems the data file creating there in /tmp folder but its a empty file.

            any help will be much appreciated.

            Comment

            • rahmathulla
              Junior Member
              • May 2013
              • 11

              #21
              Hi Guys,

              Its the problem with mongodb server I have corrected it now and I am able to use the plugin without any error.

              Comment

              • sflint
                Junior Member
                • Sep 2013
                • 1

                #22
                Same issues

                I have ran the .php script with my account and it works just fine. Creates the .data and .log with data in them. But zabbix? is running the script it creates the file as empty and it never gets any data. I am assuming this is a permissions issue? or something but I am not seeing it. I can run the script manually with zabbix user. Any ideas?

                Comment

                Working...