
Hostgroups Switches Host groups this switch is associated with Host_name AP89 The name we're giving to this switchĪlias Cisco Access Point A longer name associated with the switchĪddress 192.168.1.89 IP address of the switch
Install spiceworks and nagios how to#
I think my main problem is I can't figure out on how to get any of these CFG files to work and how they are set up. When I try and restart, I get this error " Could not register host (config file '/etc/nagios3/objects/switch.cfg'" I have nagios installed with the plugins. All I want is an email when one of these devices go down or is rebooted. My end goal is to get emails and intergrate this with spiceworks. # Sensu plugin that checks the battery time (in minutes) using apcupsd deamon.I have had huge issues getting this running. Let’s look at an apcupsd plugin I made that checks the battery time left on an APC UPS. Sensu provides a ruby gem called sensu-plugin/check/cli which makes creating plugins even easier. You can use any scripting language that will provide a number to STDOUT. Here is what the event message would look like in Slack:Īs with Nagios, creating plugins for Sensu is easy and the system is VERY flexible.

The global configuration to send messages to Slack Other options are “ok”, “warning”, and “unknown”. Only run the handler if the event is critical. Runs the handler-slack.rb plugin (installed via gem sensu-plugins-slack) which will send the event message to Slack. "command": "/opt/sensu/embedded/bin/handler-slack.rb" The other types are tcp, udp, transport, and set. The event data is passed to the process via STDIN. "command": "/opt/sensu/embedded/bin/handler-slack.rb", Let’s look at a handler that will send an event to Slack. In the past an email or SMS message was the popular way to receive an event saying something like CRITICAL: Disk /var is full! Nowadays, with our many collaboration tools we want more options. Now the fun part: let’s review how Sensu handles events. For example: a check with a refresh of 1800 will have its events (recurrences) handled every 30 minutes, to remind users of the issue. Time in seconds until the event occurrence count is considered reset for the purpose of counting occurrences, to allow an event for the check to be handled again. The number of event occurrences that must occur before an event is handled for the check. The client will run the plugin every 30 seconds. Only run the check on any nodes in the base role. This perticular handler will take the STDOUT of the event and email it to a list of users. If the disk space is more then 80%, send a WARNING event back to the Sensu server if more then 90%, send a CRITICAL event. Let’s go over a simple check called check-disk line-by-line: In fact, your Nagios scripts and plugins will work with Sensu without any changes! This should be quite familiar to people creating their own Nagios plugins. Like Nagios, the result of the event is either 0 ( OK), 1 ( WARNING), 2 ( CRITICAL), or 3 and above ( UNKNOWN). ChecksĬhecks are individual monitoring configurations that tell what plugins to run on the clients, and instruct about what to do when the check sends an event. The key thing about this is it’s AUTOMATIC! You only configure additional checks, handlers, and custom plugins for the Sensu server.


Sensu will automatically add the node to its clients list, then add the check_cpu and apache_check checks since the check subscribers match the node’s roles in Chef. "command": "/etc/sensu/plugins/check-redis.rb", "command": "/etc/sensu/plugins/check-apache.rb", Sensu has the following checks in its configuration: Sensu works in conjunction with your Chef or Puppet infrastructure by reading the roles of a node, and running specific checks on those roles.įor instance, let’s say you added a node to Chef called apache-webapp-01 with roles: linux_base and webapp. Sensu is a server-network-application health monitoring platform (It’s also a metrics platform, but I’ll get into that in another post).

After just 2 days of testing, I was ready to Old Yeller Nagios. So I set out to find a replacement that worked well with Chef, and eventually found Sensu. The configuration scheme just doesn’t fit well in an autonomous environment. However after I moved my infrastructure to Chef, Nagios was constantly giving me issues.
Install spiceworks and nagios software#
It gives you so much flexibility that expensive commercial software like Solarwinds and Spiceworks just doesn’t have. Nagios, the popular open source system and networking monitoring service, is awesome.
