Ad Widget

Collapse

Zabbix agent (active) not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisJackson
    Junior Member
    • Mar 2020
    • 7

    #1

    Zabbix agent (active) not running



    I'm just starting to use Zabbix and i'm needing some help with setting up a Zabbix agent (active) item type so I can monitor a log file.


    On a monitored machine

    I have the /etc/zabbix/zabbix_agentd.conf modifications:

    ServerActive=192.168.100.177

    Hostname=Zabbix server

    LogFile=/var/log/zabbix/zabbix_agentd.log

    Server=192.168.100.177


    And the log file im wanting to monitor:

    -rw-r--r-- 1 apache apache 2220696 Mar 10 09:23 ssl_error.log


    I have added the zabbix user to the apache group:

    # usermod -a -G apache zabbix


    Restart the zabbix agent

    systemctl restart zabbix-agent


    Now on the zabbix server HTTP web interface, I select the host and see the items list.


    I click on the top right “Create Item”

    Here is my item



    I then go back to the items page and see “c_webError_1” in the list.


    After waiting about an hour I don't see any data coming in on the Latest Data page




    Advice?


    Thanks.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Originally posted by ChrisJackson
    On a monitored machine
    I have the /etc/zabbix/zabbix_agentd.conf modifications:
    ServerActive=192.168.100.177
    Hostname=Zabbix server
    LogFile=/var/log/zabbix/zabbix_agentd.log
    Server=192.168.100.177
    Is this monitored machine the Zabbix server?

    Markku

    Comment

    • ChrisJackson
      Junior Member
      • Mar 2020
      • 7

      #3
      No, this machine is one of many monitored machines. As I understood it the
      Hostname=Zabbix server
      is the main Zabbix server hostname.

      This machine hostname is f-web-dev and this is also the
      "Host Name" entered in the Host setup.

      Comment

      • ChrisJackson
        Junior Member
        • Mar 2020
        • 7

        #4
        Also when I try and run
        zabbix_agentd -t log[/var/log/zabbix/zabbix_agentd.log,,,,skip]

        I get
        log[/var/log/zabbix/zabbix_agentd.log,,,,skip] [m|ZBX_NOTSUPPORTED] [Accessible only as active check.]

        Comment


        • Markku
          Markku commented
          Editing a comment
          That's because you cannot poll the active items. Active items mean that the agent periodically (every two minutes by default) asks the server for items to check, and then runs the item checks as configured, sending the data to the server.
      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #5
        No, this machine is one of many monitored machines. As I understood it the
        Hostname=Zabbix server
        is the main Zabbix server hostname.
        No, the server is configured with the ServerActive command as you did. Hostname command specifies the identity of the agent, and that name should exist on the Zabbix server database as a host name, ie. the Zabbix server uses that name to match the incoming (active) connection for the correct host in Zabbix database. Replace it with f-web-dev.fordav.com (updated the host name as it is shown in the screenshot above).

        Markku
        Last edited by Markku; 12-03-2020, 14:06.

        Comment

        • ChrisJackson
          Junior Member
          • Mar 2020
          • 7

          #6
          Markku
          That did it - thank you very much.

          Comment

          Working...