Hi there,
I'm working on some graphing oddities I've noticed and realized that when the RRDs were initially created, it used a default type of GAUGE for each DS. This is wrong and needs to be set to COUNTER. I created a config file in /usr/local/nagios/etc/pnp/check_commands for the command I'm using. That file is one line :
DATATYPE = COUNTER
I'm not seeing the RRD files being updated to the new type, though. Is this something that NagiosXI doesn't handle? Or is there another process for this?
Thanks!
Fixing RRD Type
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Fixing RRD Type
A gauge you say? This is something that is coming in the future, what version of XI are you currently running on? When did you first start noticing this?
Re: Fixing RRD Type
When we first switched over to NagiosXI, I copied over the plugins we were using with our existing Nagios installation. One of these is a plugin to grab various statistics from routers and switches. It uses the standard mibs which include ifHCInOctets, ifHCOutOctets, ifInErrors, ifOutErrors, etc. These are counters which just increase endlessly with time. Unfortunately, when I copied things over, I forgot about the PNP4Nagios config files I had set up which handled setting the DS Types in the RRD files. So, all of the RRDs were created with a DS type of GAUGE.
In PNP4Nagios, I believe it was possible to change the DS Type "on the fly" by updating the config file. Honestly, I don't remember as it's been a while. It does appear that the config files are working for the creation of NEW RRD files, though, so that part is at least working.
Worst case, I can delete the existing RRD files, or programatically go through and use RRDTool to fix them. Though it will be a bit disheartening to no longer see our gigabit interfaces transferring petabytes of data per second.. ;P
I think I'll try the programatic approach first..
NagiosXI 2012R2.8c (I saw R2.9 was out, planning on upgrading soon)
In PNP4Nagios, I believe it was possible to change the DS Type "on the fly" by updating the config file. Honestly, I don't remember as it's been a while. It does appear that the config files are working for the creation of NEW RRD files, though, so that part is at least working.
Worst case, I can delete the existing RRD files, or programatically go through and use RRDTool to fix them. Though it will be a bit disheartening to no longer see our gigabit interfaces transferring petabytes of data per second.. ;P
I think I'll try the programatic approach first..
NagiosXI 2012R2.8c (I saw R2.9 was out, planning on upgrading soon)
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Fixing RRD Type
I think your best approach is to disable those services or nagios entirely for the rest of the process. Then export the current rrds to xml, correct the gauge to counter, and re-(im\ex)port to rrds again. Finally correct the pnp template and restart nagios. At least thats the logic I would think should work based on past experiences.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.