Ad Widget

Collapse

active checks not working 2.06

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mattc
    Junior Member
    • Jun 2013
    • 11

    #1

    active checks not working 2.06

    Hello, I have asked this question previously but could not find an answer so am re-phrasing in the hope someone can have another look.

    My understanding from the docs is that I should be able to use (host) active checks to report data back to the Zabbix server without the server requiring access to port 10050 on the host. We plan to use this scenario for client hosts out on the internet that will report back to our Zabbix server. In Zabbix 2.06 we cannot get this to work so for a start, it would be great to have confirmation from someone using this method that the above should be working. Any help much appreciated.


    Experimenting with active only checks (no access to port 10050 from Zabbix server to host)

    Using debian squeeze and the 2.06 debs from the Zabbix docs here ... https://www.zabbix.com/documentation...#debian_ubuntu
    I am able to install succesfully and "auto registration" works fine but "active only checks" are not working no matter what I do (no data reported on server GUI)

    Installed a clean copy of Squeeze with above zabbix install, both server and host are on the same network with only a dumb soho switch in between.

    client is a windows 8 machine but same result on server 2008 and windows 7.
    Windows host config
    ===
    StartAgents=0
    ServerActive=192.168.4.202
    LogFile=c:\zabbix\zabbix_agentd.log

    ===
    Linux server config
    ===
    root@zabbixl:/home/administrator# grep ^[^#] /etc/zabbix/zabbix_server.conf
    LogFile=/var/log/zabbix/zabbix_server.log
    LogFileSize=0
    PidFile=/var/run/zabbix/zabbix_server.pid
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=xxx
    DBSocket=/var/run/mysqld/mysqld.sock
    AlertScriptsPath=/usr/lib/zabbix/alertscripts
    ExternalScripts=/usr/lib/zabbix/externalscripts
    FpingLocation=/usr/bin/fping
    Fping6Location=/usr/bin/fping6


    ==snip of host log==
    476:20130617:144650.698 Starting Zabbix Agent [TESTER-PC]. Zabbix 2.0.6 (revision 35155).
    476:20130617:144650.699 In init_collector_data()
    476:20130617:144650.701 End of init_collector_data()
    476:20130617:144650.702 In init_perf_collector()
    476:20130617:144650.704 End of init_perf_collector():SUCCEED
    8816:20130617:144650.705 agent #0 started [collector]
    5508:20130617:144650.707 agent #1 started [active checks]
    8816:20130617:144650.708 In init_cpu_collector()
    5508:20130617:144650.709 In init_active_metrics()
    8816:20130617:144650.711 In get_counter_name() pdhIndex:238
    5508:20130617:144650.712 Buffer: first allocation for 100 elements
    5508:20130617:144650.715 In send_buffer() host:'192.168.4.202' port:10051 values:0/100
    5508:20130617:144650.717 End of send_buffer():SUCCEED
    5508:20130617:144650.719 refresh_active_checks('192.168.4.202',10051)
    5508:20130617:144650.723 sending [{
    "request":"active checks",
    "host":"TESTER-PC"}]
    5508:20130617:144650.725 before read
    5508:20130617:144650.729 got [{
    "response":"success",
    "data":[]}]
    5508:20130617:144650.731 In parse_list_of_checks()
    5508:20130617:144650.733 In disable_all_metrics()
    5508:20130617:144650.735 In process_active_checks('192.168.4.202',10051)
    5508:20130617:144650.737 End of process_active_checks()
    5508:20130617:144650.739 In get_min_nextcheck()
    5508:20130617:144650.740 Sleeping for 1 second(s)
    8816:20130617:144650.797 End of get_counter_name():SUCCEED
    8816:20130617:144650.799 In get_counter_name() pdhIndex:6
    8816:20130617:144650.800 End of get_counter_name():SUCCEED
    8816:20130617:144650.801 In add_perf_counter() counter:'\Processor(_Total)\% Processor Time' interval:900
    8816:20130617:144650.803 add_perf_counter(): PerfCounter '\Processor(_Total)\% Processor Time' successfully added
    8816:20130617:144650.805 In add_perf_counter() counter:'\Processor(0)\% Processor Time' interval:900
    8816:20130617:144650.806 add_perf_counter(): PerfCounter '\Processor(0)\% Processor Time' successfully added
    8816:20130617:144650.807 In add_perf_counter() counter:'\Processor(1)\% Processor Time' interval:900
    8816:20130617:144650.808 add_perf_counter(): PerfCounter '\Processor(1)\% Processor Time' successfully added
    8816:20130617:144650.810 In add_perf_counter() counter:'\Processor(2)\% Processor Time' interval:900
    8816:20130617:144650.811 add_perf_counter(): PerfCounter '\Processor(2)\% Processor Time' successfully added
    8816:20130617:144650.813 In add_perf_counter() counter:'\Processor(3)\% Processor Time' interval:900
    8816:20130617:144650.814 add_perf_counter(): PerfCounter '\Processor(3)\% Processor Time' successfully added
    8816:20130617:144650.816 In get_counter_name() pdhIndex:2
    8816:20130617:144650.817 End of get_counter_name():SUCCEED
    8816:20130617:144650.818 In get_counter_name() pdhIndex:44
    8816:20130617:144650.820 End of get_counter_name():SUCCEED
    8816:20130617:144650.821 In add_perf_counter() counter:'\System\Processor Queue Length' interval:900
    8816:20130617:144650.823 add_perf_counter(): PerfCounter '\System\Processor Queue Length' successfully added
    8816:20130617:144650.825 End of init_cpu_collector():SUCCEED
    8816:20130617:144650.826 In collect_perfstat()
    8816:20130617:144650.828 collect_perfstat() '\System\Processor Queue Length' calculated value:0.000000
    8816:20130617:144650.830 End of collect_perfstat()
    5508:20130617:144651.742 In send_buffer() host:'192.168.4.202' port:10051 values:0/100
    5508:20130617:144651.750 End of send_buffer():SUCCEED
    5508:20130617:144651.803 Sleeping for 1 second(s)
    8816:20130617:144651.833 In collect_perfstat()
    8816:20130617:144651.841 collect_perfstat() counterpath:'\System\Processor Queue Length' old first:0 second:0
    8816:20130617:144651.847 collect_perfstat() counterpath:'\System\Processor Queue Length' new first:0 second:0
    8816:20130617:144651.853 collect_perfstat() '\System\Processor Queue Length' calculated value:0.000000
    8816:20130617:144651.860 collect_perfstat() counterpath:'\Processor(3)\% Processor Time' old first:831868281250 second:130159180108288976
    8816:20130617:144651.866 collect_perfstat() counterpath:'\Processor(3)\% Processor Time' new first:831877812500 second:130159180118390912
    8816:20130617:144651.872 collect_perfstat() '\Processor(3)\% Processor Time' calculated value:5.649274
    8816:20130617:144651.878 collect_perfstat() counterpath:'\Processor(2)\% Processor Time' old first:822216562500 second:130159180108288976
    8816:20130617:144651.882 collect_perfstat() counterpath:'\Processor(2)\% Processor Time' new first:822225937500 second:130159180118390912
    8816:20130617:144651.886 collect_perfstat() '\Processor(2)\% Processor Time' calculated value:7.196007
    8816:20130617:144651.889 collect_perfstat() counterpath:'\Processor(1)\% Processor Time' old first:828320000000 second:130159180108288976
    8816:20130617:144651.893 collect_perfstat() counterpath:'\Processor(1)\% Processor Time' new first:828330000000 second:130159180118390912
    8816:20130617:144651.896 collect_perfstat() '\Processor(1)\% Processor Time' calculated value:1.009074
    8816:20130617:144651.900 collect_perfstat() counterpath:'\Processor(0)\% Processor Time' old first:808615781250 second:130159180108288976
    8816:20130617:144651.904 collect_perfstat() counterpath:'\Processor(0)\% Processor Time' new first:808625625000 second:130159180118390912
    8816:20130617:144651.907 collect_perfstat() '\Processor(0)\% Processor Time' calculated value:2.555807
    8816:20130617:144651.910 collect_perfstat() counterpath:'\Processor(_Total)\% Processor Time' old first:822755156250 second:130159180108288976
    8816:20130617:144651.913 collect_perfstat() counterpath:'\Processor(_Total)\% Processor Time' new first:822764843750 second:130159180118390912
    8816:20130617:144651.915 collect_perfstat() '\Processor(_Total)\% Processor Time' calculated value:4.102540
    8816:20130617:144651.917 End of collect_perfstat()
    5508:20130617:144652.811 In send_buffer() host:'192.168.4.202' port:10051 values:0/100
    5508:20130617:144652.818 End of send_buffer():SUCCEED



    --Server log snip --
    5349:20130617:144707.553 Trapper got [{
    "request":"active checks",
    "host":"TESTER-PC"}] len 50
    5349:20130617:144707.553 In send_list_of_active_checks_json()
    5349:20130617:144707.553 In get_hostid_by_host() host:'TESTER-PC'
    5349:20130617:144707.553 query [txnlev:0] [select hostid,status from hosts where host='TESTER-PC' and status in (0,1) and proxy_hostid is null and hostid between 0 and 99999999999999]
    5349:20130617:144707.554 End of get_hostid_by_host():SUCCEED
    5349:20130617:144707.554 query [txnlev:0] [select i.key_,i.delay,i.lastlogsize,i.mtime from items i,hosts h where i.hostid=h.hostid and h.status=0 and i.type=7 and i.flags<>2 and h.hostid=10085 and h.proxy_hostid is null]
    5349:20130617:144707.555 send_list_of_active_checks_json() sending [{
    "response":"success",
    "data":[]}]
    5349:20130617:144707.555 End of send_list_of_active_checks_json():SUCCEED
    5342:20130617:144708.213 In get_values()
    5342:20130617:144708.213 In DCconfig_get_poller_items() poller_type:0
    5342:20130617:144708.213 End of DCconfig_get_poller_items():0
    5342:20130617:144708.213 End of get_values():0
    5342:20130617:144708.213 poller #4 spent 0.000269 seconds while updating 0 values
    5342:20130617:144708.213 In DCconfig_get_poller_nextcheck() poller_type:0
    5342:20130617:144708.213 End of DCconfig_get_poller_nextcheck():1371444431
    5342:20130617:144708.213 sleeping for 3 seconds
    5340:20130617:144708.215 In get_values()
    5340:20130617:144708.215 In DCconfig_get_poller_items() poller_type:0
    5340:20130617:144708.215 End of DCconfig_get_poller_items():0
    5340:20130617:144708.215 End of get_values():0
    5340:20130617:144708.215 poller #2 spent 0.000155 seconds while updating 0 values
    5340:20130617:144708.215 In DCconfig_get_poller_nextcheck() poller_type:0
    5340:20130617:144708.215 End of DCconfig_get_poller_nextcheck():1371444431
    5340:20130617:144708.215 sleeping for 3 seconds
    5350:20130617:144708.215 In get_pinger_hosts()
    5350:20130617:144708.216 In DCconfig_get_poller_items() poller_type:3
    5350:20130617:144708.216 End of DCconfig_get_poller_items():0
    5350:20130617:144708.216 End of get_pinger_hosts():0
    5350:20130617:144708.216 In process_pinger_hosts()
    5350:20130617:144708.216 End of process_pinger_hosts()
    5350:20130617:144708.216 icmp pinger #1 spent 0.000225 seconds while processing 0 items
    5350:20130617:144708.216 In DCconfig_get_poller_nextcheck() poller_type:3
    5350:20130617:144708.216 End of DCconfig_get_poller_nextcheck():-1
    5350:20130617:144708.216 sleeping for 5 seconds
    :
    Last edited by mattc; 19-06-2013, 04:23. Reason: solved
  • calebwong
    Junior Member
    • Dec 2011
    • 10

    #2
    Hi mattc,

    Could you please show the agent config file here?

    Comment

    • mattc
      Junior Member
      • Jun 2013
      • 11

      #3
      Have solved this issue ... problem was that active checks REQUIRE an "active checks" TEMPLATE which does not exist in the stable debs on the zabbix.com downloads area. After I worked this out, everything was fixed.

      So ... for the benefit of anyone else going through my pain

      My setup is a (xenserver VM) Debian squeeze new install with debs installed and configured using the release notes on the zabbix.com website which works extremely well.

      I wanted to monitor multiple customer servers behind firewalls without having to open incoming ports on the customer firewalls (99% are windows machines).

      We use auto registration on the zabbix server which minimises our host config even further.

      Solution:
      Once zabbix was installed, I created a full clone of the "Template os windows" and saved it as "Template os windows - active". This template is also linked to the "Template app zabbix agent" so I made a full clone of this also and labelled it "Template app zabbbix agent - active"

      Once this was done, I went to the template editor and clicked on the cloned templates and clicked "items" then each "item" under "name" column, changed the dropdown list for the "type" from "zabbiix agent" to "zabbix agent active". If you miss some, they will not show data during monitoring so they are easy to spot using the "overview" menu item.

      You have to do this for all items under both cloned templates and dont forget the "discovery rules" items which are on the right in the "template links" horizontally in the middle of the screen. (dont forget to save.)

      Now you link the "zabbix agent - active" template you just created to the "template os windows - active" template and remove the old "zabbix agent" template link from the "template os windows - active"

      Right now, you should have a complete template set for active agent monitoring. You can apply this template to your servers or workstations.

      This is only half the setup. The other half is the host config which is below. We log into the server and create a folder at c:\zabbix and put the zabbix agentd.exe and a zabbix.conf file in the folder. The config is as follows.

      StartAgents=0
      Server=xxx.xxx.xxx.xxx
      ServerActive=xxx.xxx.xxx.xxx
      LogFile=c:\zabbix\zabbix_agentd.log

      replacing the xx's with your zabbix server IP of course.

      the zabbix server config is the default config from when it was installed.

      LogFile=/var/log/zabbix/zabbix_server.log
      LogFileSize=0
      PidFile=/var/run/zabbix/zabbix_server.pid
      DBHost=localhost
      DBName=zabbix
      DBUser=zabbix
      DBPassword=xxxx
      DBSocket=/var/run/mysqld/mysqld.sock
      AlertScriptsPath=/usr/lib/zabbix/alertscripts
      ExternalScripts=/usr/lib/zabbix/externalscripts
      FpingLocation=/usr/bin/fping
      Fping6Location=/usr/bin/fping6

      Hope this helps someone in the future cos it really left me scratching my head till I figured it out!

      cheers

      -Matt
      Last edited by mattc; 19-06-2013, 05:06.

      Comment

      Working...