Ad Widget

Collapse

Can't monitor log files -

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gaidukas
    Junior Member
    • Jul 2013
    • 12

    #1

    Can't monitor log files -

    I've tried searching the forms for a solution to my issue but have not been able to find a resolution.

    I have a new install of zabbix server 2.06 and many agent hosts up and running properly but I'm not able to monitor log files.

    Here are the settings to for zabbix_agentd.conf: (comments removed)

    Code:
    PidFile=/var/run/zabbix/zabbix_agentd.pid
    LogFile=/var/log/zabbix/zabbix_agentd.log
    LogFileSize=0
    DebugLevel=4
    EnableRemoteCommands=1
    Server=10.30.50.50
    StartAgents=3
    ServerActive=10.30.50.50:20051
    Hostname=Host123
    #HostnameItem=system.hostname
    Include=/etc/zabbix/zabbix_agentd.d/
    I'm testing from the zabbix host server the following command:

    zabbix_get -s Host123 -k log["/var/log/zabbix/zabbix_agentd.log","error"]

    I've also testing with ' in place of " and also:

    zabbix_get -s Host123 -k log[/var/log/zabbix/zabbix_agentd.log,"error",0,1000]

    All tests return: ZBX_NOTSUPPORTED

    On the client host I ran:

    root@Host123:~# zabbix_agentd -V
    Zabbix Agent (daemon) v2.0.6 (revision 35158) (22 April 2013)
    Compilation time: Apr 29 2013 06:38:04

    I seem to be stuck and unable to resolve this.
    Any help would be appreciated!

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

    #2
    log items must be active, thus you will never be able to use them with _get - they must be created on server and then processed by the agent
    Zabbix 3.0 Network Monitoring book

    Comment

    • gaidukas
      Junior Member
      • Jul 2013
      • 12

      #3
      OK, that explains why I can test using zabbix_get.

      What is the best way to test? Every time I make a change to the item in my template, it takes many minutes before it starts monitoring it due to having to wait for the template to be reassigned to the host.

      Thanks,

      -Glen

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        Originally posted by gaidukas
        it takes many minutes before it starts monitoring it due to having to wait for the template to be reassigned to the host.
        Glen - That's because it is in an "Unsupported" state when you make that change. It will wait for the amount of time that is set in the GUI under "Refresh unsupported items" in Administration --> General --> Upper right dropdown box, select "Other"
        See my screenshot below.

        One way around that is to go to the template where you made your changes, put a checkmark beside each item that you modified, then at the bottom left just click "Go" with the dropdown being on "Enable selected"
        (Edit) Do that at the host level. It is possible the template may show all the items as "Enabled".

        Jeff
        Attached Files
        Last edited by tchjts1; 10-07-2013, 19:59.

        Comment

        Working...