Maintain perfdata when switching service check

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dhoskinson
Posts: 5
Joined: Wed May 10, 2017 1:28 pm

Maintain perfdata when switching service check

Post by dhoskinson »

We are moving from the standard snmp on hpux to net-snmp. Our service checks for disk usage will change to use check_xi_snmp_storage_wizard.pl. On our first box when i did this, i lost all the existing performance data as i copied the check and switched it. This time i want to just modify the existing check to use the new service check. I am hoping in that way the performance data will be retained. Most of the checks are just disk usage on various partitions. I hope someone can confirm my plan or give an alternate way to do this and maintain our historical data.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Maintain perfdata when switching service check

Post by scottwilkerson »

Unfortunately the only way you can retain all the performance data is if the 2 plugins return the exact same performance data metrics in the exact same order.

Using a different plugin almost 100% of the time would give different data.

Probably the best solution I can think of would be to setup a new check using the new data, and then disable active checks for the old service. This would leave 2 services which I know is not ideal but the only solution I can think of at this time.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dhoskinson
Posts: 5
Joined: Wed May 10, 2017 1:28 pm

Re: Maintain perfdata when switching service check

Post by dhoskinson »

scottwilkerson wrote:Unfortunately the only way you can retain all the performance data is if the 2 plugins return the exact same performance data metrics in the exact same order.

Using a different plugin almost 100% of the time would give different data.

Probably the best solution I can think of would be to setup a new check using the new data, and then disable active checks for the old service. This would leave 2 services which I know is not ideal but the only solution I can think of at this time.
Would you think we would lose the old data in the graph, or would the graph just change because of different calculations. I think we could live with the graph changing since we know at what time the change is being made, but if all drops off and starts up when the change is made, we would lean toward the duplicate checks at least for a certain amount of time. Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Maintain perfdata when switching service check

Post by scottwilkerson »

It depends on the number of datasources that are returned from each of the plugins

If they match (e.g. 4 data points on both checks) then they would just change as of the time the plugin changed.

If you ran each of the checks from the command line, so I could see the output of both, I could give you better advice
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dhoskinson
Posts: 5
Joined: Wed May 10, 2017 1:28 pm

Re: Maintain perfdata when switching service check

Post by dhoskinson »

scottwilkerson wrote:It depends on the number of datasources that are returned from each of the plugins

If they match (e.g. 4 data points on both checks) then they would just change as of the time the plugin changed.

If you ran each of the checks from the command line, so I could see the output of both, I could give you better advice

OK: FS usage 70.17 % [ 718.6 Mb / 1.0 Gb ]|usage=70;80;90 NEW CHECK OUTPUT

/: 55%used(561MB/1024MB) (<80%) : OK | '/'=561MB;819;922;0;1024 wapp-03 OLD CHECK OUTPUT

Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Maintain perfdata when switching service check

Post by scottwilkerson »

Well they both just have 1 metric, so in all likelyhood it would just change from the value in MB to the new value in %

You can always keep a copy of the old check command and if it doesn't go as expected just switch it back
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked