This document describes how you can monitor a Linux server Over a SSH connexion. This pack monitors main ressources on a server such as:
- Kernel ressources
- Memory ressources
- Network ressources
- Disk Ressources
- SSH monitor
- NTP status
This pack is designed to retreive data over SSH. The Shinken poller service needs to connect over SSH to the remote host. During the Shinken installation, the installer script creates a shinken user on the server hosting the Poller.
The Linux pack uses this user to execute remote commands. The authentication to the remote host is passwordless (managed by an authentication key). The remote user does not need to have specific rights on the system.
Create a local Shinken system user with homedir and password
adduser -m -r shinken passwd shinken |
[root@shinken-poller ~]# su - shinken [shinken@shinken-poller ~]# ssh-copy-id remote_host The authenticity of host '192.168.1.19 (192.168.1.19)' can't be established. RSA key fingerprint is 00:ff:ee:dd:cc:bb:aa:d6:d3:79:1d:f6:93:47:80:27. Are you sure you want to continue connecting (yes/no)? yes shinken@remote_host's password: XXXXXXXXXXX Now try logging into the machine, with "ssh '192.168.1.19'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. ssh shinken@remote_host -i .ssh/id_rsa |
The linux pack can be used by applying the linux host template to a host. This can be done by two different ways:
In the Configuration UI, simply create or edit a Host, and add the linux template in the Host Templates field by using the selector.
In a Cfg file of your choice, create a host and set the use property to linux.
The Cfg file must then be imported into Shinken Enterprise using a source (more information on the associated documentation page: Shinken cfg file Import).
| Check Name | Description | value range | default Warning | default Critical |
| |
|---|---|---|---|---|---|---|
| 1 | CPU Stats | Get CPU information through "mpstat" command | 0-100 | > 80 | > 90 | |
| 2 | Disks | Get DISKS information through "df" command | 0-100 | > 90 | > 95 | |
| 3 | Disks stats | Get DISKS STATS information from /proc | 0-n | N/A | N/A | |
| 4 | Kernel stats | Get kernel informations from /proc/vmstat | 0-n | N/A | N/A | |
| 5 | Load Average | Get system load information from /proc/loadavg | 0-n,0-n,0-n | > "1.5,1.5,1.5" | > "3,3,3" | |
| 6 | Memory | Get Memory information from "free" command | 0-100 | > 90 | > 95 | |
| 7 | NET Stats | Get network statistics from /proc/net/dev | 0-n | N/A | N/A | |
| 8 | NFS Stats | Get NFSd statistics from /proc/net/rpc/nfsd | 0-n | N/A | N/A | |
| 9 | NTPSync | Get timedelta with ntp server | 0-n | > 40 | > 60 | |
| 10 | Read-only Filesystems | Test if a FS is in Read-only state or not | 0-1 | N/A | = 1 | |
| 11 | Uptime | Get server uptime from "uptime" command | 0-n | N/A | < 3600 | |
| 12 | SSH connexions | Check if a SSH connexion is possible | 0-1 | N/A | = 0 | |
| 13 | TCP states | Get TCP counts by States | 0-n | N/A | N/A |
The linux pack defines default Warning and Critical thresholds for checks.
Checks from linux packs often provide data that can be changed to customize thresholds.
To change thresholds on one particular host, the most simple way is to change these datas on the host directly.
To change all hosts using the linux template, the best idea would seem to be to edit the linux host template directly and set datas.
However, on the next Shinken Enterprise update, these templates can be modified, resulting in a behaviour change and possibly break your configuration.
The best practice is to clone the elements involved in the linux pack and rename them. Then, they can be modified without any risks related to the Shinken Enterprise update process.
The cloned linux pack can then be modified and personalized according to your needs.
For example, in order to change default thresholds, edit your cloned linux host template and edit datas, as described in the previous section.