I wrote UserScript and template about monitoring ipvsadm connection
to use this
download ipvsadm.py.txt and place it as /etc/zabbix/ipvsadm.py as executable.
download zabbix_lb_connection.xml and import.
in agent host, you have to add below to /etc/zabbx/zabbix_agentd.conf and restart agent
my ipvs setting is below
in webui, copy items from template(Template_LB_connection) to ipvs host and change item key like below
This is work, but there is problem about operation.
when i add real server, i have to add or copy items and change key each time.
Does anyone know other easy way?
to use this
download ipvsadm.py.txt and place it as /etc/zabbix/ipvsadm.py as executable.
download zabbix_lb_connection.xml and import.
in agent host, you have to add below to /etc/zabbx/zabbix_agentd.conf and restart agent
UserParameter=ipvsadm.activeconn[*],/etc/zabbix/ipvsadm.py active $1 $2 $3
UserParameter=ipvsadm.inactconn[*],/etc/zabbix/ipvsadm.py inactive $1 $2 $3
UserParameter=ipvsadm.inactconn[*],/etc/zabbix/ipvsadm.py inactive $1 $2 $3
$ sudo ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.18.0.12:80 lc
-> 172.17.0.21:80 Masq 1 17 165
-> 172.17.0.22:80 Masq 1 17 203
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.18.0.12:80 lc
-> 172.17.0.21:80 Masq 1 17 165
-> 172.17.0.22:80 Masq 1 17 203
ipvsadm.activeconn[tcp,172.18.0.12:80,172.17.0.21:80]
ipvsadm.inactconn[tcp,172.18.0.12:80,172.17.0.21:80]
ipvsadm.inactconn[tcp,172.18.0.12:80,172.17.0.21:80]
when i add real server, i have to add or copy items and change key each time.
Does anyone know other easy way?
Comment