Project

General

Profile

Icinga Skillshare » History » Version 1

Jamila Khan, 09/09/2014 03:58 PM

1 1 Jamila Khan
h1. Icinga Skillshare
2
3
The monitoring software we use is "Icinga":https://www.icinga.org, which is a fork of "Nagios":http://www.nagios.com.
4
5
Our instance is at http://icinga.palantetech.com/icinga/, hosted on Ramen, the creds are in the credentials folder.
6
7
We currently have over 200 hosts, so the easiest place to look for what is happening is the "tactical overview":http://icinga.palantetech.com/cgi-bin/icinga/tac.cgi
8
9
Let's use Octavia as an example.
10
Here is the url for all the things being checked on octavia.
11
http://icinga.palantetech.com/cgi-bin/icinga/status.cgi?host=octavia
12
13
Now let's see how those are set up.
14
On Ramen, take a look at /etc/icinga/objects/ptc/octavia_ptc.cfg
15
16
This is the old way I was setting up checks.
17
I create a cfg file for each host, define the host, then define all the services for it.
18
19
Each service corresponds to a specific command definition (those live in /etc/nagios-plugins/config), which says a specific way to run a specific check script (those live in /usr/lib/nagios/plugins).
20
21
For example, the command definition for check_http is
22
23
<pre>
24
# 'check_http' command definition
25
define command{
26
        command_name    check_http
27
        command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$'
28
        }
29
</pre>
30
31
Which runs the script at /usr/lib/nagios/plugins/check_http with the -H and -I options both pointing to the $HOSTADDRESS$ variable pulled from the host definition (which for Octavia is octavia.mayfirst.org) then gives that back to Icinga which displays the results "like so":http://icinga.palantetech.com/cgi-bin/icinga/extinfo.cgi?type=2&host=octavia&service=HTTP.
32
33
Now let's look at another host, "nlg.org":http://icinga.palantetech.com/cgi-bin/icinga/status.cgi?host=nlg.org
34
35
If we look on Ramen at /etc/icinga/objects/clients/nlg/nlg.org_nlg.cfg, there are no checks defined!
36
37
That's because I've switched them over to the newer much much more efficient way.
38
39
The hosts can be put into nested hostgroups, and have services assigned to each group.
40
41
For example, the host nlg.org is in the drushbackups033 hostgroup, defined in /etc/icinga/objects/hostgroups/drushbackups.cfg.
42
That hostgroup is itself part of the drushbackups hostgroup, also defined in /etc/icinga/objects/hostgroups/drushbackups.cfg, the dnschecks hostgroup defined in /etc/icinga/objects/hostgroups/dns.cfg, and the domains hostgroup /etc/icinga/objects/hostgroups/domains.cfg.
43
44
Every host that is part of the domains hostgroup gets a service for expiration and blacklists, defined in /etc/icinga/objects/services/domain.cfg; if it's in dns, it gets that service, and if it's in a drushbackup### group, it gets drush backup checks for Drupal, Civi, and Default backups in number corresponding to the first, second, and third of the numbers at the end of the group (/etc/icinga/objects/services/drushbackup.cfg), as well as checking the oldest backup (still in progress).
45
46
Q&A
Go to top