mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3949 from florianbeer/memcached
Add snmp polling capability for Memcached
This commit is contained in:
@@ -106,14 +106,15 @@ LibreNMS contributors:
|
||||
- Marc Runkel <marc@runkel.org> (mrunkel)
|
||||
- Josh Driver <keeperofdakeys@gmail.com> (keeperofdakeys)
|
||||
- Felix Eckhofer <felix@eckhofer.com> (tribut)
|
||||
- Vikram Adukia <adukia@dropbox.com> (justmedude)
|
||||
- Vikram Adukia <adukia@dropbox.com> (justmedude)
|
||||
- Tijmen de Mes <tijmen@ag-projects.com> (tijmenNL)
|
||||
- Benjamin Busche <benjamin.busche@gmail.com> (optic00)
|
||||
- Brandon Boudrias <bt.boudrias@gmail.com> (brandune)
|
||||
- Andy Noyland <andrew@noyland.co.uk> (Zappatron)
|
||||
- Andy Noyland <andrew@noyland.co.uk> (Zappatron)
|
||||
- Cercel Valentin <crc@nuamchefazi.ro> (crcro)
|
||||
- Ahmed Sajid <ahmed4343@hotmail.com> (ahmedsajid)
|
||||
- Karsten Schmidt <git@guggemand.dk> (guggemand)
|
||||
- Florian Beer <fb@42dev.eu> (florianbeer)
|
||||
|
||||
[1]: http://observium.org/ "Observium web site"
|
||||
Observium was written by:
|
||||
|
@@ -12,6 +12,8 @@ Different applications support a variety of ways collect data: by direct connect
|
||||
6. [TinyDNS/djbdns](#tinydns-aka-djbdns) - Agent
|
||||
7. [OS Updates](#os-updates) - extend SNMP
|
||||
8. [DHCP Stats](#dhcp-stats) - extend SNMP
|
||||
9. [Memcached](#memcached) - extend SNMP
|
||||
|
||||
|
||||
* [Agent Setup](#agent-setup)
|
||||
|
||||
@@ -156,6 +158,15 @@ extend dhcpstats /opt/dhcp-status.sh
|
||||
4. Restart snmpd on your host
|
||||
5. On the device page in Librenms, edit your host and check the `DHCP Stats` under the Applications tab.
|
||||
|
||||
### Memcached
|
||||
1. Copy the [memcached script](https://github.com/librenms/librenms-agent/blob/master/agent-local/memcached) to `/usr/local/bin` (or any other suitable location) on your remote server.
|
||||
2. Make the script executable: `chmod +x /usr/local/memcached`
|
||||
3. Edit your snmpd.conf file (usually `/etc/snmp/snmpd.conf`) and add:
|
||||
```
|
||||
extend memcached /usr/local/bin/memcached
|
||||
```
|
||||
4. Restart snmpd on your host
|
||||
5. On the device page in Librenms, edit your host and check `Memcached` under the Applications tab.
|
||||
|
||||
Agent Setup
|
||||
-----------
|
||||
|
@@ -1,6 +1,14 @@
|
||||
<?php
|
||||
|
||||
$data = $agent_data['app']['memcached'][$app['app_instance']];
|
||||
if (!empty($agent_data['app']['memcached'])) {
|
||||
$data = $agent_data['app']['memcached'][$app['app_instance']];
|
||||
} else {
|
||||
$options = '-O qv';
|
||||
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.9.109.101.109.99.97.99.104.101.100';
|
||||
$result = snmp_get($device, $oid, $options);
|
||||
$result = unserialize(str_replace("<<<app-memcached>>>\n", '', $result));
|
||||
$data = $result[0];
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-memcached-'.$app['app_id'].'.rrd';
|
||||
|
||||
|
Reference in New Issue
Block a user