Ad Widget

Collapse

zabbix_trapper not sending anything

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bmcclure
    Junior Member
    • Apr 2010
    • 14

    #1

    zabbix_trapper not sending anything

    I am using a perl script to get the server-status page from Apache and parse it into various items in my Template_App_Apache template.

    It's not working at all, however. When I browse to the host in question ('centaurus'), I see all of the items listed from the template, and all of them are Active.

    I have tried it every way I can think of, and have looked through all of the documentation (which is wrong in some cases).

    Command: zabbix_sender -vv --zabbix-server '{server_ip}' --port '10051' -i '/tmp/apache-stats.txt'

    Content of apache-stats.txt:
    centaurus apache.total_accesses 88764
    centaurus apache.total_kbytes 103240
    centaurus apache.cpuload .000140388
    centaurus apache.uptime 954499
    centaurus apache.reqpersec .0929954
    centaurus apache.bytespersec 110.757
    centaurus apache.bytesperreq 1191
    centaurus apache.busyservers 6
    centaurus apache.idleservers 19

    Return value:
    zabbix_sender [30484]: DEBUG: Answer [{
    "response":"success",
    "info":"Processed 0 Failed 9 Total 9 Seconds spent 0.000073"}]
    Info from server: "Processed 0 Failed 9 Total 9 Seconds spent 0.000073"
    sent: 9; skipped: 0; total: 9

    If I tail the zabbix_server.log file on the server, nothing is output when this happens. It's as if the server does not acknowledge the request.

    I can telnet from the host to the server on port 10051, so I know it's listening.
  • bmcclure
    Junior Member
    • Apr 2010
    • 14

    #2
    I just realized there is an "official" python apache monitoring script in the documentation for 1.8, so I'm trying that now instead.

    Same results.

    I got everything set up, imported the XML file in Zabbix, linked Template_App_Apache (which 'centaurus' is a member of) with Template_App_Apache_Stats (the new app), and ran the script on centaurus with the following command:
    ./ZabbixApacheUpdater.py -c "centaurus" -z "watcher.desystem.net"

    Command output:
    zabbix_sender [22101]: DEBUG: Answer [{
    "response":"success",
    "info":"Processed 0 Failed 20 Total 20 Seconds spent 0.000172"}]
    Info from server: "Processed 0 Failed 20 Total 20 Seconds spent 0.000172"
    sent: 20; skipped: 0; total: 20

    Something's not right...

    Comment

    • bmcclure
      Junior Member
      • Apr 2010
      • 14

      #3
      I figured it out. Like some other users here, it turned out to be a case problem.

      Oddly enough, all of my hostnames are configured with lower case in zabbix_agentd.conf, however Zabbix itself sees them as having the first letter uppercase.

      Even though centaurus is specified as 'centaurus' in the config file, Zabbix sees it as 'Centaurus'

      It works fine when I use the upper-case letter in the trapper command.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        in this case, both hostname used in zabbix_sender and configured for the host in the frontend must match - the one in agent daemon config file does not matter.

        on the other hand, the one configured in agent daemon config file must match the frontend one for active checks to work, so i'd suggest unifying them.
        Zabbix 3.0 Network Monitoring book

        Comment

        • bmcclure
          Junior Member
          • Apr 2010
          • 14

          #5
          Thank you for the response. Active checks are actually working how it's currently configured, however (lower-case in the agent config, though it appears with an uppercase letter in Zabbix). I'll try uppercasing it in the agentd config and make sure it still works, as I wouldn't want it to stop working the way I have it with a future update or something.

          Comment

          Working...