Ad Widget

Collapse

template and multiple servers (net.tcp.service[xxx])

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Johanh
    Junior Member
    • May 2011
    • 5

    #1

    template and multiple servers (net.tcp.service[xxx])

    Hello all.

    first post here.
    I have a bunch of FreeBSD and Linux servers that we used to monitor with nagios.
    Now we switched to zabbix, and things are really nice.
    I have however come across some issue proberbly to do with the understanding and works of zabbix.

    We have 35 FreeBSD servers that i need to monitor, so i created server1 and linked the FreeBSD template, all is well, but it can not find the services, like http and ssh for example.
    This is due the fact that my http and ssh deamons do not listen on the localhost address, only on the iterface adres like 192.168.1.22.

    So i did go to the host, edit the item net.tcp.service[ssh] to net.tcp.service[ssh,192.168.1.22]
    And yes it works.
    But it seems that this was the item for the whole template.

    So the next host i create and link to the FreeBSD template has net.tcp.service[ssh,192.168.1.22]

    What is the best way to overcome this, how can i tell zabbix to use ssh,ip adres.
    Or do i need to create an item for each service on each host?

    i hope you get the point, explaining things in english is not my best skill

    Secondly, what is the way to go to check geom mirror state and zpool status.

    Thanks for your time

    regards,
    Johan
  • Rudd
    Member
    • Mar 2011
    • 69

    #2
    Hello and welcome

    Try to use this in your template to have the test carried out on the host ip address: net.tcp.service[tcp,{IPADDRESS},443]


    I monitor the status of zpools with the following user parameters in zabbix_agentd.conf:

    UserParameter=zpool.statusd,/usr/sbin/zpool status -x | grep -c -i "state: DEGRADED"
    UserParameter=zpool.statusf,/usr/sbin/zpool status -x | grep -c -i "state: FAULTED"
    UserParameter=zpool.statuso,/usr/sbin/zpool status -x | grep -c -i "state: OFFLINE"
    UserParameter=zpool.statusu,/usr/sbin/zpool status -x | grep -c -i "state: UNAVAILABLE"

    In your template you can use the Key "zpool.statusd" etc.

    In order for this to work you will need to enable remote commands in zabbix_agentd.conf as well (EnableRemoteCommands=1)

    Comment

    • Johanh
      Junior Member
      • May 2011
      • 5

      #3
      Thank you very much, using net.tcp.service[ssh,{IPADDRESS}] works for me.
      Now i do not have to edit all the hosts.

      Secondly the zpool monitoring works for me also if i got it right.
      Need to setup a test machine to DEGRADE, the pool and see if i get an alarm.
      I use the same principal for the gmirror, that has only three states.
      COMPLETE, DEGRADED and SYNCHRONISING
      I gues that you do not monitor the COMPLETE state, in the assumption that if it is ok, no need to check!

      Thanks for your time.

      regards,
      Johan
      Last edited by Johanh; 05-05-2011, 12:34.

      Comment

      Working...