Installing checks¶
The default configuration does not include any plugins to check the monitored hosts and services. If we leave it in this state, our system will be really unuseful!
The plugins used to check an host or service state are not part of Alignak. There are literally thousands of plugins available to check various systems. To make Alignak use a new plugin to check, you must:
- install the plugin
- declare a new command that specifies how the plugin must be used
- declare a new service on the monitored host
Alignak proposes an easy way to deal with these operations by providing the most common checks plugins already packaged in an easy installable package called an Alignak checks package.
Alignak packs¶
Alignak contributions propose some prepared checks packs that make it easy to configure new hosts to be monitored with the most current plugins.
All the currently available checks packs:
- can be listed from the alignak contributions organization on github.
- each pack has its own repository named as alignak-checks-mypack (search on GitHub with the keyword checks to get the full list)
- each pack is easily installable thanks to the Python
pip
(eg. sudo pip install alignak_checks_mypack).
Note: all the currently available packs are not introduced in the current document. To get the updated most recent list, browse the Alignak contribution organization as explained previously ;)
Old school configuration files¶
All the packs include old school legacy configuration files which declare some templates, groups, … to use the checks in an existing configuration.
The configuration files are copied, when installing, in the /usr/local/etc/alignak/arbiter/packs directory and they will be de facto include in the default configuration shipped with alignak
Alignak backend feeding files¶
All the packs include backend feeding configuration files which declare some templates, groups, … that will be made available in the Alignak backend to use the checks in an existing configuration.
The configuration files are copied, when installing, in the /usr/local/etc/alignak/backend-json/ directory. A setup.sh script is shipped aicht each checks package to import the date into an Alginak backend. when installing this script is run and, if your backend is available on http://127.0.0.1:5000 with the default credentials, the data are imported.
Anyway, you can run the setup.sh script individually with parameters according to your backend configuration to import the data::
$ /usr/local/etc/alignak/backend-json/notifications/setup.sh -h
The script you are running has basename setup.sh, dirname /usr/local/etc/alignak/backend-json/notifications
The present working directory is /home/alignak/alignak-doc
Usage: /usr/local/etc/alignak/backend-json/notifications/setup.sh [-h|--help] [-b|--backend] [-u|--username] [-p|--password]
-h (--help) display this message
-v (--verbose) verbose mode
-b (--backend) Alignak backend URI (default is http://127.0.0.1:5000)
-u (--username) Alignak backend username (default is admin)
-p (--password) Alignak backend password (default is admin)
-f (--files) Directory where the Json files are located
Alignak notifications pack¶
All the Alignak notifications packs have their own repository and are easily installable thanks to the Python pip
.
Using each pack is documented in the pack repository README file.
HTML mail notifications¶
For sending notifications as HTML formatted mails, install the notifications package.
This pack include several scripts that can be used to send notifications from Alignak:
- simple printf sent to sendmail
- python script to send HTML mail
- python script to send Slack notifications
Short story:
pip install alignak-notifications
# Old configuration file format
define contact{
contact_name hotline
use generic-contact
email hotline@corporation.com
can_submit_commands 1
notificationways detailed-email
; HTML mail commands ...
service_notification_commands notify-service-by-email-html
host_notification_commands notify-host-by-email-html
}
# Alignak backend feeding
/usr/local/etc/alignak/backend-json/notifications/setup.sh
Alignak checks packs¶
All the Alignak checks packs have their own repository and are easily installable thanks to the Python pip
.
Using each pack is documented in the pack repository README file.
Checking with the Monitoring plugins¶
For checking an host and its most common services with the “most common” plugins, install monitoring package.
The monitoring plugins are most often known as Nagios plugins… they provide many checks for network services.
Short story:
pip install alignak-checks-monitoring
define host{
use dns, ftp, http
host_name snmp_host
address 127.0.0.1
}
Checking Unix/Linux hosts/services with SNMP¶
For checking an host and its most common services through SNMP, install SNMP package.
Hosts inherit from a check command that gets the host uptime with an SNMP get, this to confirm that the host is alive and that SNMP connection is ok.
Short story:
pip install alignak-checks-snmp
define host{
use linux-snmp
host_name snmp_host
address 127.0.0.1
}
Checking Unix/Linux hosts/services with NRPE¶
For checking an host and its most common services through NRPE, install NRPE package.
Hosts inherit from a check command that gets the host NRPE daemon version, this to confirm that the host is alive and that NRPE connection is ok.
Short story:
pip install alignak-checks-nrpe
define host{
use linux-nrpe
host_name nrpe_host
address 127.0.0.1
}
Checking with WMI¶
For checking an host and its most common services through WMI, install WMI package.
Hosts inherit from a check command that gets the host uptime with a WMI request, this to confirm that the host is alive and that WMI connection is ok.
Short story:
pip install alignak-checks-wmi
define host{
use windows-wmi
host_name wmi_host
address 127.0.0.1
}
Passive checking Windows with NSCA¶
For checking a Windows host and its most common services through NSCA, install Windows NSCA package.
With this type of checking, hosts do not have any check_command (indeed they have a fake one …) because Alignak is waiting for the hosts and services to send their own check information.
Note: this checks pack assumes that your Windows host is using the NSClient agent.
Short story:
pip install alignak-checks-windows-nsca
define host{
use windows-nsca
host_name nsca_windows_host
address 0.0.0.0
}
Active checking Windows with NRPE¶
For checking a Windows host and its most common services through NRPE, install Windows NRPE package.
Note: this checks pack assumes that your Windows host is using the NSClient agent.
Short story:
pip install alignak-checks-windows-nrpe
define host{
use windows-nrpe
host_name nrpe_windows_host
address 0.0.0.0
}