Ad Widget

Collapse

Active checks configuration help (log output not showing up in overview screen)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HD_EdwinM
    Junior Member
    • Apr 2019
    • 5

    #1

    Active checks configuration help (log output not showing up in overview screen)

    Hello everyone, I have been working on setting up reliability monitoring on my using Zabbix but have had issues with active checks and log monitoring.My goal is to have the output of a log[] check to show up as a % value in my overview screen. [image3]

    Click image for larger version

Name:	SRE3.jpg
Views:	618
Size:	32.8 KB
ID:	376745

    Currently, I have a log file in /var/lib/zabbix called sre.txt This file is owned to my Zabbix user and can be opened by that user.

    Code:
    su - zabbix -c "tail /var/lib/zabbix/sre.txt"
    
    99.99
    When I set up an item using zabbix's log monitoring [Image1] I don't see any errors but I also don't get any output when I view the item in my overview section [Image2]

    Click image for larger version

Name:	SRE.jpg
Views:	705
Size:	82.2 KB
ID:	376743
    Click image for larger version

Name:	SRE2.jpg
Views:	619
Size:	29.1 KB
ID:	376744

    I am running both the zabbix-server and zabbix-agent on CentOS7. I have the active server set and the hostname set to the hostname of my zabbix-server. From what I can tell the active checks are working because I am not getting the "unsupported" error message.

    In the logs, I see that active checks are being pulled but can't tell if my new active check is running and sending data.

    From the zabbix-agent:
    Code:
     10493:20190401:161228.612 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161229.612 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161230.612 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161231.613 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161232.613 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161233.613 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161234.614 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161235.614 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161236.614 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161237.615 __zbx_zbx_setproctitle() title:'active checks #1 [getting list of active checks]'
     10493:20190401:161237.615 In refresh_active_checks() host:'76.208.85.118' port:10051
     10493:20190401:161237.640 sending [{"request":"active checks","host":"zabbix"}]
     10493:20190401:161237.665 End of refresh_active_checks():SUCCEED
     10493:20190401:161237.665 __zbx_zbx_setproctitle() title:'active checks #1 [processing active checks]'
     10493:20190401:161237.665 In process_active_checks() server:'76.208.85.118' port:10051
     10493:20190401:161237.666 End of process_active_checks()
     10493:20190401:161237.668 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161238.669 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161239.669 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161240.669 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161241.670 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
     10493:20190401:161242.670 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
    What I believe are the relevant zabbix-agent configs can be found below. If I am missing something or there is something you need to see please let me know and I will try to provide it.

    Code:
    EnableRemoteCommands=1
    Server=<zabbix-server's IP address>
    ServerActive=<zabbix-server's IP address>
    Hostname=<zabbix-server's Hostname>
    RefreshActiveChecks=60

    If I have missed anything pelse let me know. I have read a few forum posts on the topic but they havent been helpfull in getting this to work.

    TLDR; I want to get the output of a log[] key check to show up as a overview value but can't seem to get it to work.


  • HD_EdwinM
    Junior Member
    • Apr 2019
    • 5

    #2
    I was able to figure this out.

    this all stems from some confusion regarding what the Hostname = setting should be.
    Hostname should be the hostname of the agent in your host settings not the hostname of the zabbix-server.

    Comment

    Working...