Proxmox extra quotes #4908

Closed
thanegill opened this Issue Oct 31, 2016 · 1 comment

Projects

None yet

2 participants

@thanegill
Contributor
thanegill commented Oct 31, 2016 edited

The Proxmox extension isn't stripping extra quotes. I have a vm named LibreNMS in my cluster and it's listed as LibreNMS"

Relavent ./poller.php log
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -O qv -M /opt/librenms/mibs udp:HOSTNAME:161 .1.3.6.1.4.1.8072.1.3.2.3.1.2.7.112.114.111.120.109.111.120]
/etc/snmp/snmp.conf: line 6: Warning: Unknown token: rocommunity.
"keys on reference is experimental at /usr/share/perl5/PVE/API2Client.pm line 142.
<<>>
vhs
111/net0/52760476/11652/av-asset
110/net0/265894/4720/gns3
100/net0/2849005233/1377113533/LibreNMS"

SQL[UPDATE applications set device_id ='94',app_type ='proxmox',app_instance ='vhs' WHERE device_id = '94' AND app_type = 'proxmox']
Proxmox (vhs): av-asset: 52760476/11652/net0
RRD[create /opt/librenms/rrd/proxmox/vhs/111_netif_net0.rrd --step 300 DS:INOCTETS:DERIVE:600:0:12500000000 DS:OUTOCTETS:DERIVE:600:0:12500000000 RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 RRA:MIN:0.5:1:720 RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:720 RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:1440 ]
[RRD Disabled]RRD[update /opt/librenms/rrd/proxmox/vhs/111_netif_net0.rrd N:52760476:11652]
[RRD Disabled]SQL[SELECT id FROM proxmox WHERE vmid = '111' AND cluster = 'vhs']
SQL[UPDATE proxmox set device_id ='94',last_seen =NOW(),description ='av-asset' WHERE vmid = '111' AND cluster = 'vhs']
SQL[SELECT pmp.id FROM proxmox_ports pmp, proxmox pm WHERE pm.id = pmp.vm_id AND pmp.port = 'net0' AND pm.cluster = 'vhs' AND pm.vmid = '111']
SQL[UPDATE proxmox_ports set last_seen =NOW() WHERE vm_id = '9' AND port = 'net0']
Proxmox (vhs): gns3: 265894/4720/net0
RRD[create /opt/librenms/rrd/proxmox/vhs/110_netif_net0.rrd --step 300 DS:INOCTETS:DERIVE:600:0:12500000000 DS:OUTOCTETS:DERIVE:600:0:12500000000 RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 RRA:MIN:0.5:1:720 RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:720 RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:1440 ]
[RRD Disabled]RRD[update /opt/librenms/rrd/proxmox/vhs/110_netif_net0.rrd N:265894:4720]
[RRD Disabled]SQL[SELECT id FROM proxmox WHERE vmid = '110' AND cluster = 'vhs']
SQL[UPDATE proxmox set device_id ='94',last_seen =NOW(),description ='gns3' WHERE vmid = '110' AND cluster = 'vhs']
SQL[SELECT pmp.id FROM proxmox_ports pmp, proxmox pm WHERE pm.id = pmp.vm_id AND pmp.port = 'net0' AND pm.cluster = 'vhs' AND pm.vmid = '110']
SQL[UPDATE proxmox_ports set last_seen =NOW() WHERE vm_id = '10' AND port = 'net0']
Proxmox (vhs): LibreNMS": 2849005233/1377113533/net0
RRD[create /opt/librenms/rrd/proxmox/vhs/100_netif_net0.rrd --step 300 DS:INOCTETS:DERIVE:600:0:12500000000 DS:OUTOCTETS:DERIVE:600:0:12500000000 RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 RRA:MIN:0.5:1:720 RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:720 RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:1440 ]
[RRD Disabled]RRD[update /opt/librenms/rrd/proxmox/vhs/100_netif_net0.rrd N:2849005233:1377113533]
[RRD Disabled]SQL[SELECT id FROM proxmox WHERE vmid = '100' AND cluster = 'vhs']
SQL[UPDATE proxmox set device_id ='94',last_seen =NOW(),description ='LibreNMS"' WHERE vmid = '100' AND cluster = 'vhs']
SQL[SELECT pmp.id FROM proxmox_ports pmp, proxmox pm WHERE pm.id = pmp.vm_id AND pmp.port = 'net0' AND pm.cluster = 'vhs' AND pm.vmid = '100']
SQL[UPDATE proxmox_ports set last_seen =NOW() WHERE vm_id = '8' AND port = 'net0']

DO NOT DELETE THIS INFORMATION.

Please read this information carefully.

  • Is your install up to date? Updating your install
    Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
  • Please include all of the information between the ==================================== section of ./validate.php.
  • If you would like us to add a new device then please provide the information asked for here
  • Please provide as much detail as possible.
@laf laf added the Bug label Nov 3, 2016
@thanegill
Contributor

Output of /usr/bin/snmpbulkwalk -v2c -c public -Oq -m IP-MIB -M /opt/librenms/mibs udp:10.114.5.134:161 1.3.6.1.4.1.8072.1.3.2.3.1.2.7.112.114.111.120.109.111.120:

/etc/snmp/snmp.conf: line 6: Warning: Unknown token: rocommunity.
SNMPv2-SMI::enterprises.8072.1.3.2.3.1.2.7.112.114.111.120.109.111.120 "keys on reference is experimental at /usr/share/perl5/PVE/API2Client.pm line 142.
<<<app-proxmox>>>
vhs
115/net0/99180189/12630/cron-uploads
110/net0/99189632/20582/gns3
113/net0/99186323/143171/git
114/net0/3130684355/2505746904/haproxy
116/net0/99179437/17280/graylog
112/net0/99186672/17280/oxidized
101/net0/86269794/438592759/litmag
100/net0/4754975459/4295672158/LibreNMS"

Output of root@pve1:~# /usr/local/bin/proxmox:

keys on reference is experimental at /usr/share/perl5/PVE/API2Client.pm line 142.
<<<app-proxmox>>>
vhs
115/net0/98929213/12630/cron-uploads
100/net0/4712184224/4014227251/LibreNMS
116/net0/98928461/17280/graylog
114/net0/3119282389/2495266665/haproxy
113/net0/98929681/17238/git
110/net0/98938656/20540/gns3
101/net0/86131240/437740497/litmag
112/net0/98935696/17238/oxidized
@murrant murrant closed this in #5003 Nov 21, 2016
@murrant murrant added a commit that referenced this issue Nov 21, 2016
@laf @murrant laf + murrant fix: Strip out " returned from Proxmox application #4908 (#5003)
* fix: Strip out " returned from Proxmox application

* updated to str_replace
63569b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment