Skip to main content

Checks pack for monitoring Unix/Linux or Windows hosts with SNMP active checks

Most recent PyPi version Join the chat #alignak on freenode.net License AGPL v3

Note that the Windows part for this pack is not yet available.

If you are interested in such a checks pack and if you are monitoring some Windows hosts with SNMP, please contact us (IRC or open an issue in this project)

Installation

The installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg. /usr/local/share/alignak/etc). The copied files are located in the default sub-directory used for the packs (eg. arbiter/packs for the Nagios legacy cfg files or arbiter/backend-json for the backend importable files).

From Alignak packages repositories

More information in the online Alignak documentation. Here is only an abstract…

Debian:

# Alignak DEB stable packages
sudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61

sudo apt-get update
sudo apt install python-alignak-checks-snmp

CentOS:

sudo vi /etc/yum.repos.d/alignak-stable.repo:
   [Alignak-rpm-stable]
   name=Alignak RPM stable packages
   baseurl=https://dl.bintray.com/alignak/alignak-rpm-stable
   gpgcheck=0
   repo_gpgcheck=0
   enabled=1

sudo yum repolist

sudo yum install python-alignak-checks-snmp

From PyPI

To install the package from PyPI:

# Python 2
sudo pip install alignak-checks-snmp

# Python 3
sudo pip3 install alignak-checks-snmp

From source files

To install the package from the source files:

git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-snmp
cd alignak-checks-snmp
sudo pip install .

Note: using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)

Documentation

This checks pack is using the some PERL plugins that are shipped with the checks pack, but some PERL dependencies are necessary.

Install PERL dependencies for PERL plugins

On some Linux distros, you can:

sudo apt-get install libsnmp-perl libnet-snmp-perl

Or you can use the PERL cpan utility:

cpan install Net::SNMP

Configuration

Edit the /usr/local/share/alignak/etc/arbiter/packs/snmp/resources.cfg file and configure the SNMP community.:

#-- Default SNMP community
$SNMPCOMMUNITYREAD$=public

Prepare host

Some operations are necessary on the monitored hosts if SNMP remote access is not yet activated.
# Install local SNMP agent
su -
apt-get update
apt-get install snmpd

# Allow SNMP get - this configuration is intended for tests puuposes
# You should set up a more secure configuration and not allow everyone to see everything :)
vi /etc/snmp/snmpd.conf
=>
   #  Listen for connections from the local system only
   #agentAddress  udp:127.0.0.1:161
   #  Listen for connections on all interfaces (both IPv4 *and* IPv6)
   agentAddress udp:161,udp6:[::1]:161
=>
   # rocommunity public  default    -V systemonly
   rocommunity public

# Restart SNMP agent
sudo systemctl restart snmpd.service

Test remote access with the plugins files:

$ /usr/local/var/libexec/alignak/check_snmp_mem.pl -H 127.0.0.1 -C public -w 80,80 -c 90,95
Ram : 71%, Swap : 58% : ; OK

Alignak configuration

To define the SNMP community to be used per default, edit the resources.cfg file and change the default value.

$SNMPCOMMUNITYREAD$=public

You simply have to tag the concerned hosts with the template linux-snmp.

define host{
    use                     linux-snmp
    host_name               host_snmp
    address                 127.0.0.1
}

The main linux-snmp template declares macros used to configure the launched checks. The default values of these macros listed hereunder can be overriden in each host configuration.

_SNMPCOMMUNITY      $SNMPCOMMUNITYREAD$
_SNMP_MSG_MAX_SIZE  65535

_LOAD_WARN          2,2,2
_LOAD_CRIT          3,3,3
_STORAGE_WARN       90
_STORAGE_CRIT       95
_CPU_WARN           80
_CPU_CRIT           90
_MEMORY_WARN        80,80
_MEMORY_CRIT        95,95
_NET_IFACES         eth\d+|em\d+
_NET_WARN           90,90,0,0,0,0
_NET_CRIT           0,0,0,0,0,0

To set a specific value for an host, declare the same macro in the host definition file.

define host{
    use                     linux-snmp
    host_name               host_snmp
    address                 127.0.0.1

    # Specific values for this host
    # Change warning and critical alerts level for memory
    # Same for CPU, ALL_CPU, DISK, LOAD, NET, ...
    _LOAD_WARN       3,3,3
    _LOAD_CRIT       5,5,5
}

Bugs, issues and contributing

Contributions to this project are welcome and encouraged … issues in the project repository are the common way to raise an information.

Metadata

Release files for alignak_checks_snmp 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alignak_checks_snmp 2.0.2
File Size Uploaded
alignak_checks_snmp-2.0.2.tar.gz 99.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alignak_checks_snmp 2.0.2
File Interpreter ABI Platform
alignak_checks_snmp-2.0.2-py2-none-any.whl Python 2 none any Details

Total release size: 197.3 kB

Release files / alignak_checks_snmp-2.0.2.tar.gz

Download URL alignak_checks_snmp-2.0.2.tar.gz
Size 99.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0be90d300a04e54fc0400e9e4322db80bacfbb7d6e6ea5ba6df3128d1dac31ae
BLAKE2b-256 checksum
How to use checksums
aeb1d99407387677abf4da41bf27ff139591b56ebed4e2606741bcb6b368a145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

Release files / alignak_checks_snmp-2.0.2-py2-none-any.whl

Download URL alignak_checks_snmp-2.0.2-py2-none-any.whl
Size 97.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
05ee2189733f93f2e12cf85c34f13c8a5543493a977bcc37b7835660ad9ef6ee
BLAKE2b-256 checksum
How to use checksums
b1ff42b8e8872e02380c945b61aed71f4c93f2391a465ab43a11fed922af9b23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

1.0.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page