Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Dec 12, 2018 10:58 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: No negative SNMP values are stored in the rrd-file:
PostPosted: Mon Dec 03, 2018 9:58 am 
Offline

Joined: Thu Jun 28, 2018 10:02 am
Posts: 4
Location: Switzerland
Hello
Since English is not my language, I use DeepL to translate, excuse me...

I've been trying to fix a problem for weeks and I'm stuck:
I want to monitor positive and negative outside temperatures. The values are retrieved via SNMP.
Problem: No negative SNMP values are stored in the rrd-file:
SNMP-Value:
Code:
snmpget -v2c -c public 192.168.92.100 iso.3.6.1.4.1.2021.2000.4.4.1.2.5.116.101.109.112.51.1
iso.3.6.1.4.1.2021.2000.4.4.1.2.5.116.101.109.112.51.1 = STRING: "-10.22"


rrrd-File, filled via snmp not works correct:
Code:
rrdtool info server_sonne_snmp_oid_130.rrd
filename = "server_sonne_snmp_oid_130.rrd"
rrd_version = "0003"
step = 60
last_update = 1543848236
header_size = 3704
ds[snmp_oid].index = 0
ds[snmp_oid].type = "GAUGE"
ds[snmp_oid].minimal_heartbeat = 600
ds[snmp_oid].min = -2.0000000000e+01
ds[snmp_oid].max = 6.0000000000e+01
ds[snmp_oid].last_ds = "10.22"
ds[snmp_oid].value = 5.7232000000e+02
ds[snmp_oid].unknown_sec = 0


rrd-File, filled via rrdtools update works fine:
Code:
rrdtool update server_sonne_snmp_oid_130.rrd N:-10.22
info server_sonne_snmp_oid_130.rrd

filename = "server_sonne_snmp_oid_130.rrd"
rrd_version = "0003"
step = 60
last_update = 1543848563
header_size = 3704
ds[snmp_oid].index = 0
ds[snmp_oid].type = "GAUGE"
ds[snmp_oid].minimal_heartbeat = 600
ds[snmp_oid].min = -2.0000000000e+01
ds[snmp_oid].max = 6.0000000000e+01
ds[snmp_oid].last_ds = "-10.22"
ds[snmp_oid].value = -2.4172703744e+02
ds[snmp_oid].unknown_sec = 0


Where do I make the mistake?

---
Cacti V 1.2.0 Beta 2
RRDtool V1.0.0
NET-SNMP V 5.7.3


Top
 Profile  
 
 Post subject: Re: No negative SNMP values are stored in the rrd-file:
PostPosted: Sat Dec 08, 2018 1:59 pm 
Offline

Joined: Thu Jun 28, 2018 10:02 am
Posts: 4
Location: Switzerland
Unfortunately I did not receive a solution. But I have an idea for a workaround:
The values (temperature) provided by the script are increased by 100. Via CDEF 100 are subtracted again before the output. Only positive values are transferred via SNMP, now also negative values are displayed... :-)


Top
 Profile  
 
 Post subject: Re: No negative SNMP values are stored in the rrd-file:
PostPosted: Tue Dec 11, 2018 4:12 pm 
Offline

Joined: Tue Dec 11, 2018 2:36 pm
Posts: 2
I have the same problem

by snmp I get a negative value
Code:
snmpget -v1 -c klotik_ro 10.215.130.21 .1.3.6.1.4.1.2021.2000.10.4.1.2.5.116.101.109.112.48.1
UCD-SNMP-MIB::ucdavis.2000.10.4.1.2.5.116.101.109.112.48.1 = STRING: "-22.25"


cacti writes a positive value to the rrd file
Code:
rrdtool info /var/db/cacti/rra/local_linux_machine_term_8.rrd | grep term
filename = "/var/db/cacti/rra/local_linux_machine_term_8.rrd"
ds[term].index = 0
ds[term].type = "GAUGE"
ds[term].minimal_heartbeat = 600
ds[term].min = -4,0000000000e+01
ds[term].max = 1,0000000000e+02
ds[term].last_ds = "22.25"
ds[term].value = 0,0000000000e+00
ds[term].unknown_sec = 0


Code:
uname -a
FreeBSD jail_2 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64
pkg info | grep cacti
cacti-1.1.38                   Web-driven graphing interface for RRDTool
pkg info | grep rrd
rrdtool-1.7.0_2                Round Robin Database Tools
pkg info | grep net-snmp
net-snmp-5.7.3_19              Extendable SNMP implementation


What needs to be changed to work properly cacti?


Top
 Profile  
 
 Post subject: Re: No negative SNMP values are stored in the rrd-file:
PostPosted: Tue Dec 11, 2018 4:19 pm 
Offline

Joined: Tue Dec 11, 2018 2:36 pm
Posts: 2
The solution proposed by Alpenjunge is original. But I would like to make the cacti work properly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group