Ad Widget

Collapse

Zabbix Active Check Troubleshooting

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • geoidwalker
    Junior Member
    • Feb 2022
    • 3

    #1

    Zabbix Active Check Troubleshooting

    I am probably missing something very simple - but I can't for the life of me get active checks to work using linux or bsd agents with my zabbix server.
    I run zabbix 5.4 to monitor 4 or 5 Bsd servers, 3 linux servers, and about 5 cisco/netgear switches and routers.
    Everything works great! Except..I want to display the contents of a file that updates daily (using a script running du -sh)
    So - active checks seem the way to go.
    On my agent I have:
    ServerActive=ZabbixServer matching exactly what I have set for host in my Zabbix Server.
    Then I create an item to try and get an active check. I tried
    log["/usr/home/user/sizes/file"]
    and then to keep it simple just system.uptime or system.hostname
    I get no data - just blank. The Item says "enabled" and I get no errors in the logs on either the server or the agent.
    Here's the server log:

    97401:20220223:123047.796 enabling Zabbix agent checks on host "Server9": interface became available

    And the Server9 Agent Log:
    35347:20220223:122518.198 Starting Zabbix Agent [ZabbixServer]. Zabbix 5.4.9 (revision d81e50696f).
    35347:20220223:122518.198 **** Enabled features ****
    35347:20220223:122518.199 IPv6 support: YES
    35347:20220223:122518.199 TLS support: YES
    35347:20220223:122518.199 **************************
    35347:20220223:122518.199 using configuration file: /usr/local/etc/zabbix54/zabbix_agentd.conf
    35347:20220223:122518.199 agent #0 started [main process]
    35348:20220223:122518.199 agent #1 started [collector]
    35349:20220223:122518.200 agent #2 started[listener #1]
    35350:20220223:122518.200 agent #3 started[listener #2]
    35351:20220223:122518.201 agent #4 started[listener #3]
    35352:20220223:122518.202 agent #5 started [active checks #1]

    I'm a bit stumped - everything appears to be working just no data coming through. Do I need this attached to a template maybe? I have the FreeBSD template applied and data didn't come passively until that was applied. Makes sense since you have to tell Zabbix Server what to look for. How do I do that for Active though? Something simple I'm sure. Thanks for any help or even if its just to point me to the right logs or manuals. I've read the docs on active checks for Zabbix 54 many times but I must be missing something.
  • Answer selected by geoidwalker at 01-03-2022, 19:47.
    geoidwalker
    Junior Member
    • Feb 2022
    • 3

    Thanks so much for your time..I feel like a complete and total idiot. The issue was the Hostname= needs to be the hostname of the agent. Somehow my brain kept thinking it needed to be the Server. So - as soon as I put the correct hostname of the agent, as configured on the server everything works and I can monitor my log file now. Just like the docs said. Zabbix rocks! Thanks again.

    Comment

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

      #2
      ServerActive=ZabbixServer matching exactly what I have set for host in my Zabbix Server.
      Can you elaborate a bit on this...? What have you set for host in Zabbix Server?
      That parameter should contain either your zabbix server IP or your proxy IP, if you have set "monitored by proxy"...

      Comment

      • geoidwalker
        Junior Member
        • Feb 2022
        • 3

        #3
        Thanks cyber. My Zabbix Server has a hostname of ZabbixServer.
        In the agent conf I have:
        ServerActive=IP of ZabbixServer
        Hostname=ZabbixServer
        Then on ZabbixServer itself I configured a host called ZabbixServer and I made sure the hostname set on my agent matches the exact name I gave this host. I got errors in the config files about active checks until I had the same hostname in both the agent conf and the server host.

        Comment

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

          #4
          So this is agent on your Zabbix server? Not any of those bsd or linux boxes...
          Server parameter is mandatory. Its not enough to just have ServerActive.

          Comment

          • geoidwalker
            Junior Member
            • Feb 2022
            • 3

            #5
            Thanks so much for your time..I feel like a complete and total idiot. The issue was the Hostname= needs to be the hostname of the agent. Somehow my brain kept thinking it needed to be the Server. So - as soon as I put the correct hostname of the agent, as configured on the server everything works and I can monitor my log file now. Just like the docs said. Zabbix rocks! Thanks again.

            Comment

            Working...