Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Keepalived VRRP
0.2
2016-05-10
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
BSD
13530
File | Description |
---|---|
check_keepalived_vrrp.pl | v0.2 |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
By default, the desired state of an instance (backup or master) is determined by comparing a Keepalived's VRRP instance's current state to its intitial state. Use '-b' or '-m' to specify that an instance should be either in a backup state or a master state. If a weight is specified, an instance is assumed to be master if its effective priority (i.e. weight) is greater than or equal to the specified weight. The arguments '-b', '-m', and '-w' are incompatible.
The check returns the following codes:
Success (0): Keepalived is running and the desired state matches the current state.
Warning (1): Keepalived is running and the desired state is backup, but the current state is master.
Critical (2): Keepalived is not running or the desired state is master, but the current state is backup.
Unknown (3): SNMP agent is not responding, or invalid CLI options provided.
Specific instances can be monitored by using the '-i pcre' option and specific instances can be excluded by using the '-x pcre' option. The exclude option is processed after the include option. By default all instances are reported.
Example usage:
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public
Virtual Routers: 2 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: by initial/current states
vRouter Count: 2
-
dnsvrrp0.nwc (OKAY)
Virtual Router ID: 20
State (current): master
State (desired):: master
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp1.nwc (OKAY)
Virtual Router ID: 21
State (current): backup
State (desired):: backup
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public -m
Virtual Routers: 1 CRIT, 1 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: manually specified
vRouter Count: 2
-
dnsvrrp1.nwc (CRIT)
Virtual Router ID: 21
State (current): backup
State (desired):: master
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp0.nwc (OKAY)
Virtual Router ID: 20
State (current): master
State (desired):: master
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public -w 125
Virtual Routers: 1 WARN, 1 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: by weight
vRouter Count: 2
-
dnsvrrp0.nwc (WARN)
Virtual Router ID: 20
State (current): master
State (desired):: backup
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp1.nwc (OKAY)
Virtual Router ID: 21
State (current): backup
State (desired):: backup
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
syzdek@nagios.prv.nwc$
The check returns the following codes:
Success (0): Keepalived is running and the desired state matches the current state.
Warning (1): Keepalived is running and the desired state is backup, but the current state is master.
Critical (2): Keepalived is not running or the desired state is master, but the current state is backup.
Unknown (3): SNMP agent is not responding, or invalid CLI options provided.
Specific instances can be monitored by using the '-i pcre' option and specific instances can be excluded by using the '-x pcre' option. The exclude option is processed after the include option. By default all instances are reported.
Example usage:
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public
Virtual Routers: 2 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: by initial/current states
vRouter Count: 2
-
dnsvrrp0.nwc (OKAY)
Virtual Router ID: 20
State (current): master
State (desired):: master
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp1.nwc (OKAY)
Virtual Router ID: 21
State (current): backup
State (desired):: backup
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public -m
Virtual Routers: 1 CRIT, 1 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: manually specified
vRouter Count: 2
-
dnsvrrp1.nwc (CRIT)
Virtual Router ID: 21
State (current): backup
State (desired):: master
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp0.nwc (OKAY)
Virtual Router ID: 20
State (current): master
State (desired):: master
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
root@nagios# ./check_keepalived_vrrp.pl -a dnslvs20.prv.nwc -c public -w 125
Virtual Routers: 1 WARN, 1 OKAY - Keepalived v1.2.19 (04/19,2016)|
-
Router ID: dnslvs20.prv.nwc.acsalaska.net
Check Method: by weight
vRouter Count: 2
-
dnsvrrp0.nwc (WARN)
Virtual Router ID: 20
State (current): master
State (desired):: backup
State (initial): master
Weight (base): 100
Weight (effective): 100
Virtual IP Address: 216.67.109.140 (set)
Virtual IP Address: [2001:4948:f:53::140] (set)
Virtual IP Status: allSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
-
dnsvrrp1.nwc (OKAY)
Virtual Router ID: 21
State (current): backup
State (desired):: backup
State (initial): backup
Weight (base): 25
Weight (effective): 25
Virtual IP Address: 216.67.109.141 (unset)
Virtual IP Status: notAllSet
Primary Interface: eth1.2009
LVS Sync Daemon: disabled
|
root@nagios#
syzdek@nagios.prv.nwc$
Reviews (0)
Be the first to review this listing!