Monitoring Setup - Local Installations:

There is a MIB file in the repository (tools/snmp/PROVISION-MIB.mib). It contains the description of the OID numbers provided by ProVision. 


Step 0: In order to test you must install snmpd:

apt-get install snmpd snmp-mibs-downloader

On CentOS7, use the following command: yum install net-snmp net-snmp-utils


Step 1: Add the following lines in  /etc/snmp/snmpd.conf:

view all included   .1.3.6.1.4.1.36009 
pass .1.3.6.1.4.1.36009 /usr/bin/php /var/www/html/[/var/www/html/[$ProVisionDir]/tools, etc]/tools/snmp/Provision.php



Step 2: Add the MIB file to the shared mib library:

ln -s /var/www/html/[/var/www/html/[$ProVisionDir]/tools/snmp/PROVISION-MIB.mib /usr/share/snmp/mibs/PROVISION-MIB.txt


Step 3: Restart the webserver

systemctl restart snmpd


Step 4: Verify the SNMP is working

snmpwalk -v 2c -m +PROVISION-MIB -c public 127.0.0.1 provisionStats


OID

KPI

Description

.1.3.6.1.4.1.36009.1.0


Web Service Status

Connects to the instance API with wrong user and password. It waits for 403 (Unauthorized customer).

.1.3.6.1.4.1.36009.1.3

DB Replication status

Shows master/slave status. Currently we keep the initial version of the code based on instance replicant id, even when it's not used.

.1.3.6.1.4.1.36009.1.4         

Provision DB service status

Tries to get TLR resource via RQ class.

.1.3.6.1.4.1.36009.1.5


Provision local authentication status

The monitor creates customer, tries to login, then removes the customer.

.1.3.6.1.4.1.36009.1.6

Current users logged in

Uses direct queries from php_sessions table.

.1.3.6.1.4.1.36009.1.8


ENUM Subscriber count

Number of unique NAPTR Records in zones whose names end with "e164.arpa.". The query uses zone resource attributes in order to be able to provide the result as quickly as possible.

.1.3.6.1.4.1.36009.1.9

ACP Service Status

Monitors ACP Service linked to ProVision.


Number

KPI

Description

1

DNS Service Status

UDP Query for localhost. Response type 'host doesn't exist' is also valid.

2

Zone transfer rate

Number of zone pushes for a server for the last minute

3

Dynamic Update rate

Number of dynamic updates for a server for the last minute


Additional Information:

These are OID numbers from which SNMP clients can gather information. They are directly provided by the OS:


CPU Load time:
1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

Memory:
Total memory:
.1.3.6.1.4.1.2021.4.5.0

Memory Free:
.1.3.6.1.4.1.2021.4.6.0

Disks:
Path where the disk is mounted: 
.1.3.6.1.4.1.2021.9.1.2.1


Path of the device for the partition: 
.1.3.6.1.4.1.2021.9.1.3.1


Total size of the disk/partion (kBytes): 
.1.3.6.1.4.1.2021.9.1.6.1


Available space on the disk: 
.1.3.6.1.4.1.2021.9.1.7.1


Used space on the disk: 
.1.3.6.1.4.1.2021.9.1.8.1


Percentage of space used on disk: 
.1.3.6.1.4.1.2021.9.1.9.1


Percentage of inodes used on disk: 
.1.3.6.1.4.1.2021.9.1.10.1

Network:
Network interfaces:
.1.3.6.1.2.1.31.1.1.1.1

Network Received Packets:
.1.3.6.1.2.1.31.1.1.1.7.1

Network Outgoing Packets:
.1.3.6.1.2.1.31.1.1.1.11.2

Individual counters for incoming traffic in bytes:
.1.3.6.1.2.1.31.1.1.1.6

Individual counters for outgoing traffic in bytes:
.1.3.6.1.2.1.31.1.1.1.10

The number of inbound packets that contained errors
.1.3.6.1.2.1.2.2.1.14

Current maximum allowed connections (ProvisionStats.maxConnections)
.1.3.6.1.4.1.36009.4.0

The peak number of connections since the database server daemon was started (ProvisionStats.maxUsedConnections)
.1.3.6.1.4.1.36009.4.1

The number of currently open connections (ProvisionStats.threadsConnected)
.1.3.6.1.4.1.36009.4.2


NOTE: If the MySQL maximum connections limit is reached, then ProVision will not be able to respond to the SNMP Daemon, as it will not be able to connect to MySQL. Please keep this in mind when setting alert thresholds.

NOTE: ProVision collects information from /proc/meminfo. We calculate usedMemory in the following way: 100 - ((availableMemory / totalMemory) * 100). 



ProVision SNMP KPIs can be configured to send trap events for the ProVision application. For the host system KPIs (CPU, RAM, etc.) the monitoring tool will need to be configured to poll the KPIs and then set the alert thresholds accordingly.


Open data/globals.php and add the following lines.

SNMP Version 2c:

define('SNMP_TRAP_VERSION', 'v2c');
define('SNMP_TRAP_V2C_COMMUNITY', 'enter_v2c_community');
define('SNMP_TRAP_HOST', 'enter_snmp_host');

SNMP Version 3:

define('SNMP_TRAP_VERSION', '3');
define('SNMP_TRAP_V3_ENGINE_ID', 'enter_engine_id');
define('SNMP_TRAP_V3_AUTH_USER', 'enter_auth_user');
define('SNMP_TRAP_V3_AUTH_PASSWORD', 'enter_auth_password');
define('SNMP_TRAP_V3_AUTH_PROTOCOL', 'enter_auth_protocol');
define('SNMP_TRAP_V3_PRIV_PASSWORD', 'enter_auth_priv_password');
define('SNMP_TRAP_HOST', 'enter_snmp_host');


SNMP TrapsV3 using AES cypher:

define('SNMP_TRAP_VERSION', '3');
define('SNMP_TRAP_HOST', '[host]');
define('SNMP_TRAP_V3_ENGINE_ID', '[engine_id]');
define('SNMP_TRAP_V3_AUTH_USER', '[auth_user]');
define('SNMP_TRAP_V3_AUTH_PASSWORD', '[auth_password]');
define('SNMP_TRAP_V3_PRIV_PASSWORD', '[passphrase]');