Postgress APP help

Hello, I’m having problems with to get snmp data from Postgres APP, I have done all steps at the webconfig page.

When I executed “./postgres” I receive correct information, but no data registered on librenms, no graph and no data in database.

Thanks,

Is your snmpd able to run that script?

I dont’t know how to test this, I suppose that you refer librenms user can execute postgres script.

Yes i checked it. And this is the answer:

I executed ./validate.php and everything is ok, and the server is monitoring. The problem is only with the app.

Many thanks

I mean the snmpd user.

ps axu | grep snmp

Then chown the postgres script to the user of snmpd

I made the change,now, the user snmd on librenms is propiertary of postgres script, but still no data.
I attached photo.

Thanks,

Then manually poll that device with ./poller.php -d -h DEVICEID -m applications and check the output for errors getting the postgres data

Hello again,

I cant see any errors but also cant see postgres module.

I attached the result of the command.
LibreNMS Poller
SQL[select migration from migrations order by id desc limit 1 [] 0.69ms]

SQL[select count(*) as aggregate from migrations limit 1 [] 0.54ms]

SQL[SELECT version() [] 1.02ms]

===================================
Version info:
Commit SHA: 83dd1f0a167f0a44fa992477d31a34893885d909
Commit Date: 1588001024
DB Schema: 2020_04_13_150500_add_last_error_fields_to_bgp_peers (164)
PHP: 7.2.16-1+ubuntu16.04.1+deb.sury.org+1
MySQL: 10.0.38-MariaDB-0ubuntu0.16.04.1
RRDTool: 1.5.5
SNMP: NET-SNMP 5.7.3
==================================DEBUG!
Updating os_def.cache…
Done
Override poller modules: applications
Starting polling run:

SQL[SELECT * FROM devices WHERE disabled = 0 AND hostname = ‘192.168.13.100’ ORDER BY device_id ASC [] 0.87ms]

SQL[select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = ‘BASE TABLE’ [“librenms”,“migrations”] 0.57ms]

SQL[select migration from migrations [] 0.47ms]

SQL[select distinct os from devices [] 0.69ms]

SQL[select * from devices where device_id = ? limit 1 [44] 0.67ms]

SQL[select * from devices_attribs where devices_attribs.device_id = ? and devices_attribs.device_id is not null [44] 0.34ms]

Hostname: 192.168.13.100
Device ID: 44
OS: linux
(unix)

SQL[select hostname, overwrite_ip from devices where hostname = ? limit 1 [“192.168.13.100”] 0.61ms]

[FPING] ‘/usr/bin/fping’ ‘-e’ ‘-q’ ‘-c’ ‘3’ ‘-p’ ‘500’ ‘-t’ ‘500’ ‘192.168.13.100’
array (
‘xmt’ => 3,
‘rcv’ => 3,
‘loss’ => 0,
‘min’ => 0.59,
‘max’ => 1.25,
‘avg’ => 0.86,
‘dup’ => 0,
‘exitcode’ => 0,
)
SQL[INSERT IGNORE INTO device_perf (xmt,rcv,loss,min,max,avg,device_id,timestamp,debug) VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {“xmt”:3,“rcv”:3,“loss”:0,“min”:0.59,“max”:1.25,“avg”:0.86,“device_id”:44,“debug”:"[]"} 0.66ms]

SQL[UPDATE devices set last_ping=?,last_ping_timetaken=? WHERE device_id=? [“2020-04-28 16:05:31”,0.86,44] 0.82ms]

SNMP Check response code: 0
Modules status: Global+
OS
Device

Load poller module core

SNMP[’/usr/bin/snmpget’ ‘-v1’ ‘-c’ ‘COMMUNITY’ ‘-OQnUt’ ‘-m’ ‘SNMPv2-MIB’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/dell’ ‘udp:HOSTNAME:161’ ‘sysUpTime.0’ ‘sysLocation.0’ ‘sysContact.0’ ‘sysName.0’ ‘sysObjectID.0’ ‘sysDescr.0’]
...0 = 1853139
...0 = Sitting on the Dock of the Bay
...0 = Me [email protected]
...0 = postgresmontosa
...0 = ..4.1.8
...0 = Linux postgresmontosa 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64

SNMP[’/usr/bin/snmpget’ ‘-v1’ ‘-c’ ‘COMMUNITY’ ‘-OQnUst’ ‘-m’ ‘HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/dell’ ‘udp:HOSTNAME:161’ ‘snmpEngineTime.0’ ‘hrSystemUptime.0’]
hrSystemUptime.0 = 122214360
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: snmpEngineTime.0
Uptime seconds: 1222144
InfluxDB data: {“measurement”:“uptime”,“tags”:{“hostname”:“192.168.13.100”},“fields”:{“uptime”:1222144}}
RRD[update 192.168.13.100/uptime.rrd N:1222144 --daemon unix:/var/run/rrdcached.sock]
Uptime: 14 days 3 hours 29 minutes 4 seconds
SQL[select * from locations where (location = ?) limit 1 [“Sitting on the Dock of the Bay”] 0.44ms]

Runtime for poller module ‘core’: 0.0453 seconds with 131400 bytes
SNMP: [2/0.03s] MySQL: [0/0.00s] InfluxDB: [1/0.00s] RRD: [1/0.00s]

Unload poller module core

InfluxDB data: {“measurement”:“poller-perf”,“tags”:{“hostname”:“192.168.13.100”,“module”:“core”},“fields”:{“poller”:0.04529285430908203}}
RRD[update 192.168.13.100/poller-perf-core.rrd N:0.045292854309082 --daemon unix:/var/run/rrdcached.sock]
Modules status: Global+
OS
Device

Load poller module applications

SQL[SELECT * FROM applications WHERE device_id = ? [44] 0.66ms]

postgresSNMP[’/usr/bin/snmpwalk’ ‘-v1’ ‘-c’ ‘COMMUNITY’ ‘-Oqv’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/dell’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.8072.1.3.2.3.1.2.8.112.111.115.116.103.114.101.115’]
End of MIB

InfluxDB data: {“measurement”:“app”,“tags”:{“hostname”:“192.168.13.100”,“name”:“postgres”,“app_id”:“9”},“fields”:{“backends”:""}}
RRD[update 192.168.13.100/app-postgres-9.rrd N:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE applications set app_state=?,app_status=?,timestamp=NOW() WHERE app_id = ? [“UNKNOWN”,"",9] 1.06ms]

SQL[SELECT * FROM application_metrics WHERE app_id=? [9] 0.34ms]

: …
SQL[SELECT C.id,C.device_id,C.type,C.label,C.status,C.disabled,C.ignore,C.error,CP.attribute,CP.value FROM component as C LEFT JOIN component_prefs as CP on C.id=CP.component WHERE ( C.device_id = ? AND C.type = ? ) [44,“postgres”] 0.58ms]

Runtime for poller module ‘applications’: 0.0232 seconds with 64768 bytes
SNMP: [1/0.01s] MySQL: [4/0.00s] InfluxDB: [2/0.02s] RRD: [2/0.00s]

Unload poller module applications

InfluxDB data: {“measurement”:“poller-perf”,“tags”:{“hostname”:“192.168.13.100”,“module”:“applications”},“fields”:{“poller”:0.0232241153717041}}
RRD[update 192.168.13.100/poller-perf-applications.rrd N:0.023224115371704 --daemon unix:/var/run/rrdcached.sock]

Start Device Groups

SQL[select * from devices where devices.device_id = ? limit 1 [44] 0.65ms]

SQL[select * from device_groups [] 0.27ms]

SQL[select devices.device_id, device_group_device.device_group_id as pivot_device_group_id, device_group_device.device_id as pivot_device_id from devices inner join device_group_device on devices.device_id = device_group_device.device_id where device_group_device.device_group_id in (1) [] 0.72ms]

SQL[select exists(select * from devices left join services on devices.device_id = services.device_id where (services.service_ip = ? OR services.service_ip = ? OR services.service_ip = ? OR services.service_ip = ? OR services.service_ip = ? OR services.service_ip = ? OR services.service_ip = ?) and devices.device_id = ?) as exists [“192.168.7.1”,“192.168.7.2”,“192.168.7.3”,“192.168.7.5”,“192.168.7.6”,“192.168.7.7”,“192.168.7.9”,44] 0.68ms]

SQL[select * from device_group_device where device_id = ? [44] 0.28ms]

Groups Added:
Groups Removed:

End Device Groups, runtime: 0.0117s

InfluxDB data: {“measurement”:“ping-perf”,“tags”:{“hostname”:“192.168.13.100”},“fields”:{“ping”:0.86}}
RRD[update 192.168.13.100/ping-perf.rrd N:0.86 --daemon unix:/var/run/rrdcached.sock]
InfluxDB data: {“measurement”:“poller-perf”,“tags”:{“hostname”:“192.168.13.100”,“module”:“ALL”},“fields”:{“poller”:1.173}}
RRD[update 192.168.13.100/poller-perf.rrd N:1.173 --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE devices set uptime=?,last_ping=NOW(),last_ping_timetaken=? WHERE device_id = ? [1222144,0.86,44] 2.16ms]

Updating 192.168.13.100

Polled in 1.173 seconds

Start Alerts

SQL[select * from devices where devices.device_id = ? limit 1 [44] 0.57ms]

SQL[select device_groups.*, device_group_device.device_id as pivot_device_id, device_group_device.device_group_id as pivot_device_group_id from device_groups inner join device_group_device on device_groups.id = device_group_device.device_group_id where device_group_device.device_id = ? [44] 0.75ms]

SQL[select * from locations where locations.id = ? limit 1 [11] 0.39ms]

SQL[select exists(select * from alert_schedule inner join alert_schedulables on alert_schedule.schedule_id = alert_schedulables.schedule_id where ((recurring = ? and start <= NOW() and end >= NOW()) or (recurring = ? and (start_recurring_dt <= date_format(NOW(), ‘–%d’) and (end_recurring_dt >= date_format(NOW(), ‘–%d’) or end_recurring_dt is null or end_recurring_dt = ? or end_recurring_dt = ?)) and start_recurring_hr <= date_format(NOW(), ‘%H:%i:%s’) and end_recurring_hr >= date_format(NOW(), ‘%H:%i:%s’) and (recurring_day like CONCAT(’%’, date_format(NOW(), ‘’), ‘%’) or recurring_day is null or recurring_day = ?))) and ((alert_schedulable_type = ? and alert_schedulable_id = ?) or (alert_schedulable_type = ? and 0 = 1) or (alert_schedulable_type = ? and alert_schedulable_id = ?))) as exists [0,1,“0000-00-00”,"","",“device”,44,“device_group”,“location”,11] 2.11ms]

SQL[select * from devices where devices.device_id = ? limit 1 [44] 0.69ms]

SQL[SELECT DISTINCT a.* FROM alert_rules a
LEFT JOIN alert_device_map d ON a.id=d.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND d.device_id = ?)
LEFT JOIN alert_group_map g ON a.id=g.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND g.group_id IN (SELECT DISTINCT device_group_id FROM device_group_device WHERE device_id = ?))
LEFT JOIN alert_location_map l ON a.id=l.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND l.location_id IN (SELECT DISTINCT location_id FROM devices WHERE device_id = ?))
LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id AND dg.device_id = ?
WHERE a.disabled = 0 AND (
(d.device_id IS NULL AND g.group_id IS NULL)
OR (a.invert_map = 0 AND (d.device_id=? OR dg.device_id=?))
OR (a.invert_map = 1 AND (d.device_id != ? OR d.device_id IS NULL) AND (dg.device_id != ? OR dg.device_id IS NULL))
) [44,44,44,44,44,44,44,44] 2.01ms]

End Alerts

SQL[INSERT IGNORE INTO perf_times (type,doing,start,duration,devices,poller) VALUES (:type,:doing,:start,:duration,:devices,:poller) {“type”:“poll”,“doing”:“192.168.13.100”,“start”:1588082729.761592,“duration”:“1.474”,“devices”:1,“poller”:null} 0.53ms]

./poller.php 192.168.13.100 2020-04-28 16:05:31 - 1 devices polled in 1.474 secs
SNMP [4/0.06s]: Get[3/0.05s] Getnext[0/0.00s] Walk[1/0.01s]
MySQL [10/0.01s]: Cell[1/0.00s] Row[-1/-0.00s] Rows[5/0.01s] Column[0/0.00s] Update[3/0.01s] Insert[2/0.00s] Delete[0/0.00s]
InfluxDB [6/0.05s]: Write[6/0.05s]
RRD [6/0.00s]: Update[6/0.00s]

As you can see, you get End of MIB when you poll for postgres data.

But I see you are using snmp v1… Not sure if that could be an issue but for sure End of MIB is not the expected return

Finally the problem was solved, the configuration of the destiny’s snmp was blocking the app mibs.

Thanks!!!