Add snmp polling capability for Proxmox #4052

Merged
merged 1 commit into from Aug 17, 2016

Projects

None yet

3 participants

@florianbeer
Contributor
florianbeer commented Aug 13, 2016 edited

Could someone that uses Proxmox monitoring with check_mk please test this patch? I think I didn't screw anything up, but better be sure.

@laf
Member
laf commented Aug 14, 2016

It seems to work ok, I get patchy graphs though - however it appears that I've always had patchy graphs for proxmox :(

Docs need updating.

@laf laf commented on an outdated diff Aug 14, 2016
doc/Extensions/Applications.md
@@ -168,6 +169,17 @@ 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.
+### Proxmox
+1. Copy the [proxmox script](https://github.com/librenms/librenms-agent/blob/master/agent-local/proxmox) to `/usr/local/bin` (or any other suitable location) on your remote server.
@laf
laf Aug 14, 2016 Member

I'd add a curl command to download the raw file directly to /usr/local/bin/proxmox

@laf laf commented on an outdated diff Aug 14, 2016
doc/Extensions/Applications.md
@@ -168,6 +169,17 @@ 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.
+### Proxmox
+1. Copy the [proxmox script](https://github.com/librenms/librenms-agent/blob/master/agent-local/proxmox) to `/usr/local/bin` (or any other suitable location) on your remote server.
+2. Make the script executable: `chmod +x /usr/local/memcached`
@laf
laf Aug 14, 2016 Member

wrong file.

@laf laf and 1 other commented on an outdated diff Aug 14, 2016
doc/Extensions/Applications.md
@@ -168,6 +169,17 @@ 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.
+### Proxmox
+1. Copy the [proxmox script](https://github.com/librenms/librenms-agent/blob/master/agent-local/proxmox) 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 proxmox /usr/local/bin/proxmox
+```
+(Note: if your snmpd doesn't run as root, you might have to invoke the script using sudo. `extend proxmox /usr/bin/sudo /usr/local/bin/proxmox`)
+4. Restart snmpd on your host
+5. On the device page in Librenms, edit your host and check `Proxmox` under the Applications tab.
@laf
laf Aug 14, 2016 Member

In the code you don't actually check that this is enabled.

If this is because you only want to do it if you don't have data from check_mk then maybe move it into the first (isset($config['enable_proxmox']) && $config['enable_proxmox'] && !empty($agent_data['app'][$name])) { and check if $proxmox is set and if not then call your new code.

@florianbeer
florianbeer Aug 15, 2016 Contributor

But if I move it into the first part of the if statement and encapsulate it in isset($proxmox) my code will never be called.

It checks for !empty($$agent_data['app‘][$name]) and assigns that to $proxmox in the next step.

@laf
laf Aug 17, 2016 Member

Sorry yes you are correct.

If you can fix the other couple of issues and re-base we should be good.

@florianbeer florianbeer Add snmp polling capability for Proxmox
a61c1b2
@laf laf merged commit 1e565db into librenms:master Aug 17, 2016

1 of 2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@laf
Member
laf commented Aug 17, 2016

Thanks as always :)

@florianbeer florianbeer deleted the florianbeer:proxmox branch Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment