250 likes | 344 Views
The Nagios light-bar. David Stern. david.stern@jhuapl.edu. What is it?. Why do we need it?. DoD work requires air-gapped networks How would you know if a service is down if you’re not on the network?. The Hardware. An unobstructed View.
E N D
The Nagios light-bar David Stern david.stern@jhuapl.edu
Why do we need it? DoD work requires air-gapped networks How would you know if a service is down if you’re not on the network?
Equipment network discovery program Initial connection requires crossover cable
The network MUST be active before you power-on the unit It might be a smart idea to set the light-bar for DHCP address It would be a smart idea to monitor that the light-bar is available
If I can control the light-bar from the web, why not use WGET
The Secret Sauce; undocumented http://light-bar/cmd.cgi\?action=ST\&t=A2\&a=1 makes the light-bar go beep http://light-bar/cmd.cgi\?action=ST\&t=A2\&a=0 turns off the noise http://light-bar/cmd.cgi\?action=ST\&t=GR\&a=1 makes the green light go on http://light-bar/cmd.cgi\?action=ST\&t=GR\&a=0 turns off the green light Substitute OR for GR to affect the orange(yellow) light Substitute RE for GR to affect the red light
Getting nagios status We can get the nagios status from the Service page: http://nagios-server/nagios/cgi-bin/status\?host=all Just search it for “serviceTotalsPROBLEMS” N.B. You may need to insert authentication information in URL http://nagiosadmin:nag-password@nagios-server/nagios/cgi-bin/status\?host=all You can use the same format for the light-bar authentication
Mission Creep How about if we get the light-bar to beep the first time a new alert occurs? And since we don’t use nagios WARNING conditions, let’s use the yellow light to indicate unacknowledged alerts Let’s put it all together…
Other cool things you can do with WGET Hierarchical Nagios:A core nagios aware of other installs
Configuring “hierarchical” nagios • Backup nagios before and after these changes • Install a Nagios server in each lab/sub-site • Edit side.{html,php}, Add stanza for each sub-site and set refresh=300, • Tag each nagios sub-site: Main.{html,php} and status.c status.cgi • Modify light-bar cron job to check each sub-site, swap red,green dots as needed
The Results Faster response time/higher uptime Better awareness of our networks