Icinga2 plugins package using Request Manager to manage requests to machines and use Cache when possible thus to remove load on worker machine and reduce UDP requests quantity.
- Redis (Key => Val DB Database using RAM to stock data)
- Hiredis (C Redis C implementation)
- EasySNMP (Net-SNMP lib created using Cython)
- Nagiosplugin (Nagios plugin Python lib)
Testing 4 Python libs:
- EasySNMP
- NetSNMP
- PySNMP
- Unix SNMP lib native Unix function called with os.popen as NativeSNMP
Tests were executed using same OIDs and SNMPWalk function.
Results in seconds (s):
Times called | EasySNMP | NetSNMP | PySNMP | NativeSNMP |
---|---|---|---|---|
1 x | 0.013871s | 0.003734s | 0.516798s | 0.005819s |
10 x | 0.020231s | 0.016021s | 4.788551s | 0.058144s |
100 x | 0.053363s | 0.180546s | 53.863760s | 0.616921s |
1 000 x | 0.381411s | 1.931081s | 3255.206666s | 6.720697s |
10 000 x | 3.930478s | 18.342071s | N/A | 156.051447s |
Average Time for 1 req. | EasySNMP | NetSNMP | PySNMP | NativeSNMP |
---|---|---|---|---|
Times called x 1 | 0.013871s | 0.003734s | 0.516798s | 0.005819s |
Times called x 10 | 0.002023s | 0.001602s | 0.478855s | 0.005814s |
Times called x 100 | 0.000534s | 0.001806s | 0.538638s | 0.006169s |
Times called x 1 000 | 0.000381s | 0.001931s | 3.255207s | 0.006721s |
Times called x 10 000 | 0.000393s | 0.001834s | N/A | 0.015605s |
------------------------ | -------------- | -------------- | -------------- | ------------- |
Summary of Average | 0.003440s | 0.002181s | 1.197375s | 0.008026s |
EasySNMP manages very well big quantity of requests using single SNMP session.
Not done yet!!
- Check Disk I/O (checking disk input/output)
- Check Interface Traffic (Checking Network activity on selected Net Interface)
- Check Load (Checking Machine Load)
- Check Linux Memory (Checking Memory on Linux Machines)
- Check Alteon Memory (Check Memory on ALTEON Machines)
- Check Bintec Memory (Check Memory on BINTEC Machines)
- Check Cisco ASR Memory (Check Memory on CISCO ASR Machines)
- Check Cisco Memory (Check Memory on CISCO Machines)
- Check Cisco Nexus Memory (Check Memory on CISCO NEXUS Machines)
- Check Fortinet Memory (Check Memory on FORTINET Machines)
- Check H3C Memory (Check Memory on H3C Machines)
- Check Juniper Memory (Check Memory on JUNIPER Machines)
- Check Sun Memory (Check Memory on SUN Machines)
- Check Windows Memory (Check Memory on WINDOWS Machines)
- Check Linux CPU (checking CPU on linux Machines)
- Check Sun CPU (Check CPU on SUN Machines)
- Check Windows CPU (Check CPU on WINDOWS Machines)
- Check Juniper CPU (Check CPU on Juniper Machines)
- Check H3C CPU (Check CPU on H3C Machines)
- Check Fortinet CPU (Check CPU on FORTINET Machines)
- Check Fortinet5103 CPU (Check CPU on FORTINET5103 Machines)
- Check Cisco Nexus CPU (Check CPU on CISCO NEXUS Machines)
- Check Cisco ASR CPU (Check CPU on CISCO ASR Machines)
- Check Cisco ASA CPU (Check CPU on CISCO ASA Machines)
- Check Bintec CPU (Check CPU on BINTEC Machines)
- Check Alteon CPU (Check CPU on ALTEON Machines)
- ...
-H - hostname/IP
-p - Port number (default: 161)
-C - Community (default: bornan)
-v - Version (default: 2)
-c - Critical value (default: 90)
-w - Warning value (default: 80)
-V - Verbose Level (default: 0, log print. action: count)
Monitoring disk's I/O data.
-d - Disk to monitor label. a.e. sda, vda etc...
$ python check_disk_io.py -H 127.0.0.1 -v 2c -c bornan -d sda -c 90 -w 80
alert_ioread
alert_iowrite
DISKIO OK - alert_ioread is 0 | alert_ioread=0.0;80.0;90.0 alert_iowrite=0.0;80.0;90.0
DISKIO UNKNOWN - Error while fetching Indexes. Label: vdd
Monitoring machine's network activity on selected interface.
-d or --descr - Interface name to monitor. a.e. eth0, eth1 etc...
$ python check_interface_traffic.py -H 127.0.0.1 -v 2c -c bornan -c 90 -w 80 -d eth0
alert_traffic_in_percent
alert_traffic_out_percent
traffic_in_bps
traffic_out_bps
INTERFACETRAFFIC OK - traffic_in_bps is 13.23 | alert_traffic_in_percent=0.0;80.0;90.0 alert_traffic_out_percent=0.0;80.0;90.0 traffic_in_bps=13.23 traffic_out_bps=13.7
INTERFACETRAFFIC UNKNOWN - Error while ...
Monitoring Linux machine's CPU activity in %.
No params to pass
$ python check_linux_cpu.py -H 127.0.0.1 -v 2c -c bornan -c 90 -w 80
alert_cpu_percent
LINUXCPU OK - alert_cpu_percent is 0.75 | alert_cpu_percent=0.75;80.0;90.0
LINUXCPU UNKNOWN - Error while ...
Monitoring machine's load status.
No params to pass
$ python check_load.py -H 127.0.0.1 -v 2c -c bornan -c 90 -w 80
load_1
alert_load_5
load_15
SYSTEMLOAD OK - load_15 is 0.15 | alert_load_5=0.0;80.0;90.0 load_15=0.15 load_1=0.0
SYSTEMLOAD UNKNOWN - Error while ...
Copyright (c) 2016 Aurimas NAVICKAS All Rights Reserved.