Overviewβ
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.
Plugin-Pack Assetsβ
Monitored Objectsβ
This Plugin-Pack provides assets to monitor all types of Linux based systems with a SSH server enabled:
- Centos
- Redhat
- Debian
- Ubuntu
- Fedora
- ...
Collected Metricsβ
- Cpu
- Cpu Detailled
- Memory
- Filesdate
- Filessize
- Diskio
- Openfiles
- Swap
- Load
- Uptime
- Paging
- Connections
- Inodes
- Process
- Ntp
- Quota
- Storage
- Traffic
Metric name | Description |
---|
cpu.utilization.percentage | CPU utilization. Unit : % |
core.cpu.utilization.percentage | CPU utilization by core. Unit : % |
Metric name | Description |
---|
cpu_user | Average user for CPU. Unit : % |
cpu_nice | Average nice for CPU. Unit : % |
cpu_system | Average system for CPU. Unit : % |
cpu_idle | Average idle for CPU. Unit : % |
cpu_wait | Average wait for CPU. Unit : % |
cpu_interrupt | Average interrupt for CPU. Unit : % |
cpu_softirq | Average softirq for CPU. Unit : % |
cpu_steal | Average steal for CPU. Unit : % |
cpu_guest | Average guest for CPU. Unit : % |
cpu_guestnice | Average guest nice for CPU. Unit : % |
Metric name | Description |
---|
total_cpu_guest_avg | Total average guest CPUs. Unit : % |
total_cpu_guestnice_avg | Total average guest nice CPUs. Unit : % |
total_cpu_idle_avg | Total average idle CPUs. Unit : % |
total_cpu_interrupt_avg | Total average interrupt CPUs. Unit : % |
total_cpu_nice_avg | Total average nice CPUs. Unit : % |
total_cpu_softirq_avg | Total average softirq CPUs. Unit : % |
total_cpu_steal_avg | Total average steal CPUs. Unit : % |
total_cpu_system_avg | Total average system CPUs. Unit : % |
total_cpu_user_avg | Total average user CPUs. Unit : % |
total_cpu_wait_avg | Total average wait CPUs. Unit : % |
Metric name | Description |
---|
used | Memory used. Unit : B |
slab | Slab allocation memory used. Unit : B |
buffer | Memory buffured. Unit : B |
cached | Memory cached. Unit : B |
Metric name | Description |
---|
name | Time (modified, creation,...) of files/directories. Unit: s |
Metric name | Description |
---|
name | Size of one file/directorie. Unit : B |
total | Total Size of files/directories. Unit : B |
Metric name | Description |
---|
device.io.read.usage.bytespersecond | Read IO usage in Bytes per second. Unit : B/s |
device.io.write.usage.bytespersecond | Write IO usage in Bytes per second. Unit : B/s |
device.io.read.time.milliseconds | Read time in milliseconds. Unit : ms |
device.io.write.time.milliseconds | Write time in milliseconds. Unit : ms |
device.io.utils.percentage | IO utilization for different usage type of CPU. Unit : % |
Metric name | Description |
---|
system.files.open.count | Number of files opened on the system |
Metric name | Description |
---|
swap.usage.bytes | Swap usage. Unit: B |
swap.free.bytes | Swap free. Unit: B |
swap.usage.percentage | Swap usage in percentage. Unit: % |
Metric name | Description |
---|
load1 | Load average on 1 minute. |
load5 | Load average on 5 minutes. |
load15 | Load average on 15 minutes. |
Metric name | Description |
---|
uptime | Duration of system has been working and available. Unit : s |
Metric name | Description |
---|
system.pgpgin.usage.bytespersecond | Usage of the number of pgpgin in bytes per second. Unit : B/s |
system.pgpgout.usage.bytespersecond | Usage of the number of pgpgout in bytes per second. Unit : B/s |
system.pswpin.usage.bytespersecond | Usage of the number of pswpin in bytes per second. Unit : B/s |
system.pswpout.usage.bytespersecond | Usage of the number of pages in bytes per second. Unit : B/s |
system.pgfault.usage.bytespersecond | Usage pgfault in bytes per second. Unit : B/s |
system.pgmajfault.usage.bytespersecond | Usage pgmajfault in bytes per second. Unit : B/s |
Metric name | Description |
---|
app | Number of application connection |
service | Number of service connection |
con_closed | Number of connection closed |
con_closeWait | Number of connection on wait close |
con_closing | Number of connection closing |
con_established | Number of connection etablished |
con_finWait1 | Number of connection finWait1 |
con_finWait2 | Number of connection finWait1 |
con_lastAck | Number of connection on last Ack |
con_listen | Number of connection on listen |
con_synReceived | Number of connection synchronized Received |
con_synSent | Number of connection synchronized syn Sent |
con_timeWait | Number of connection on time wait |
total | Total of connection |
Metric name | Description |
---|
used | Inodes space usage on partitions. Unit : % |
Metric name | Description |
---|
nbproc | Number of current processes. |
Metric name | Description |
---|
offset | Offset of ntpd service. Unit : ms |
Metric name | Description |
---|
data_used | Quota usage on partitions. Unit : B |
Metric name | Description |
---|
used | Storage usages. Unit : B |
Metric name | Description |
---|
status | Status of the interface |
interface.traffic.in.bitspersecond | Incoming traffic going through the interface. Units: b/s |
interface.traffic.out.bitspersecond | Outgoing traffic going through the interface. Units: b/s |
Prerequisitesβ
SSH configurationβ
A user is required to query the OS Linux by SSH. There is no need for root or sudo privileges.
There are two possible ways to perform SSH check, either by exchanging the SSH key from centreon-engine to the target server,
or by setting your unique user and password directly in the host macros.
- SSH keys exchange
- User/Password Authentication
Add and generate a password for your user on the Target sever:
adduser ro_ssh_centreon
passwd ro_ssh_centreon
Switch to centreon-engine
's bash environment on your Central server and Poller :
Then, copy this key on to the Target server with the following commands:
ssh-keygen -t ed25519 -a 100
ssh-copy-id -i .ssh/id_ed25519.pub ro_ssh_centreon@<IP_TARGET_SERVER>
After setting the Name, Alias, IP, and Host Template parameters, you need to set up in the macros described in the Configuration part below.
Installationβ
- Online License
- Offline License
- Install the Centreon Plugin on every poller monitoring Linux SSH resources:
yum install centreon-plugin-Operatingsystems-Linux-Ssh.noarch
- On the Centreon Web interface in "Configuration > Plugin packs > Manager", install the Linux SSH Plugin-Pack
- Install the Centreon Plugin on every poller monitoring Linux SSH resources:
yum install centreon-plugin-Operatingsystems-Linux-Ssh.noarch
- On the Centreon Central server, install the Centreon Plugin-Pack from the RPM:
yum install centreon-pack-operatingsystems-linux-ssh.noarch
- On the Centreon Web interface in "Configuration > Plugin packs > Manager", install the Linux SSH Plugin-Pack
Configurationβ
Add a new Host and apply the Os-Linux-SSH-custom Host Template.
Once the template set, you have to set values according to the chosen SSH backend.
3 SSH backends are available to connect to the Linux server: sshcli, plink and libssh which are detailed below.
sshcli backendβ
Mandatory | Name | Description |
---|
X | SSHBACKEND | Name of the backend: sshcli |
X | SSHUSERNAME | By default, it uses the user running process centengine on your poller |
| SSHPASSWORD | Cannot be used with backend. Only ssh key authentication |
| SSHPORT | By default: 22 |
| SSHEXTRAOPTIONS | Customize it with your own if needed. E.g.: --ssh-priv-key=/user/.ssh/id_rsa |
With that backend, you have to validate the target server fingerprint manually (with the SSHUSERNAME used).
plink backendβ
Mandatory | Name | Description |
---|
X | SSHBACKEND | Name of the backend: plink |
X | SSHUSERNAME | By default, it uses the user running process centengine on your poller |
| SSHPASSWORD | Can be used. If not set, SSH key authentication is used |
| SSHPORT | By default: 22 |
| SSHEXTRAOPTIONS | Customize it with your own if needed. E.g.: --ssh-priv-key=/user/.ssh/id_rsa |
With that backend, you have to validate the target server fingerprint manually (with the SSHUSERNAME used).
libssh backend (by default)β
Mandatory | Name | Description |
---|
X | SSHBACKEND | Name of the backend: libssh |
X | SSHUSERNAME | By default, it uses the user running process centengine on your poller |
| SSHPASSWORD | Can be used. If not set, SSH key authentication is used |
| SSHPORT | By default: 22 |
| SSHEXTRAOPTIONS | Customize it with your own if needed. E.g.: --ssh-priv-key=/user/.ssh/id_rsa |
With that backend, you don't have to validate the target server fingerprint manually.
How to check in the CLI that the configuration is OK and what are the main options for ?β
Once the Plugin installed, log into your poller using the centreon-engine user account and test by running the following command :
/usr/lib/centreon/plugins//centreon_linux_ssh.pl \
--plugin=os::linux::local::plugin \
--mode='cpu' \
--hostname='10.30.2.114' \
--ssh-backend='libssh' \
--ssh-username='myuser' \
--ssh-password='mypassword' \
--ssh-port='22' \
--warning-core='60' \
--critical-core='70' \
--warning-average='60' \
--critical-average='75' \
--verbose \
--use-new-perfdata
OK: CPU(s) average usage is 11.91 % - CPU '0' usage : 11.91 % |
'cpu.utilization.percentage'=11.91%;;;0;100 '0#core.cpu.utilization.percentage'=11.91%;;;0;100
CPU '0' usage : 11.91 %
The check command gives the average CPU of a device using SSH (--mode=CPU
).
It uses a SSH username centreon (--ssh-username=centreon
), a SSH password centreon-password (--ssh-password='centreon-password'
),
uses a SSH backend libssh (--ssh-backend='libssh'
) and it connects to the host 10.30.2.114 (--hostname=10.30.2.114
)
on the SSH default port 22 (---ssh-port=22
).
This command will trigger a WARNING alarm if the CPU Average increases to more than 60% (--warning-average='60'
)
and a CRITICAL alarm if more than 75% (--critical-average='75'
).
Thresholds can be set on all of the device metrics using the syntax --warning-*metric* --critical-*metric*
.
All the options that can be used with this plugin can be found over the --help
command:
/usr/lib/centreon/plugins//centreon_linux_ssh.pl --plugin=os::linux::local::plugin
--mode=cpu --help
I have that error message: UNKNOWN: Command error: Host key verification failed.
. What does it mean ?β
It means you haven't manually validated the target server fingerprint with ssh
or plink
on the Centreon poller.