Apache
Either use SNMP extend or use the agent.
Note
That you need to install and configure the Apache mod_status module before trying the script.
- Download the script onto the desired host (the host must be added to LibreNMS devices)
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/apache-stats.py -O /etc/snmp/apache-stats.py
- Make the script executable
chmod +x /etc/snmp/apache-stats.py
- Create the cache directory, '/var/cache/librenms/' and make sure that it is owned by the user running the SNMP daemon.
mkdir -p /var/cache/librenms/
- Verify it is working by running /etc/snmp/apache-stats.py Package
urllib3
for python3 needs to be installed. In Debian-based systems for example you can achieve this by issuing:
apt-get install python3-urllib3
- Edit your snmpd.conf file (usually /etc/snmp/snmpd.conf) and add:
extend apache /etc/snmp/apache-stats.py
- Restart snmpd on your host
sudo systemctl snmpd restart
- Test by running
snmpwalk <various options depending on your setup> localhost NET-SNMP-EXTEND-MIB::nsExtendOutput2Table
Install prerequisites
apt-get install libwww-perl
install agent
Install the agent) on this device if it isn't already and copy the apache
script to /usr/lib/check_mk_agent/local/
-
Verify it is working by running
/usr/lib/check_mk_agent/local/apache
-
Create the cache directory, '/var/cache/librenms/' and make sure that it is owned by the user running the SNMP daemon.
mkdir -p /var/cache/librenms/
-
On the device page in Librenms, edit your host and check the
Apache
under the Applications tab.