RESOLVED: PNP4Nagios mixes up performance data of IP subnets

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
JaMo
Posts: 3
Joined: Thu Jul 21, 2022 8:47 am

RESOLVED: PNP4Nagios mixes up performance data of IP subnets

Post by JaMo »

Hello everyone!

I have the following problem at the moment:
I check the phase-2 connections of various VPN tunnels. The performance data is being output like this (ANON1-9 are subnet IDs like "192.168.0.0"):
up_networks=9, down_networks=0, local_networks=1, remote_networks=8, phase2_connections=8, "ANON1"=1, "ANON2"=1, "ANON3"=1, "ANON4"=1, "ANON5"=1, "ANON6"=1, "ANON7"=1, "ANON8"=1, "ANON9"=1
I noticed that the graphs sometimes change between the subnets, ANON1 might at first have the graph of ANON1 but the next time I check ANON4 has the graph of ANON1.
I only noticed this because one subnet was behaving strange and I could immediately make it out but then I wondered why a "different subnet" suddenly was behaving the same. Until I realized that the graphs actually changed.
The known subnets of every host are stored in a json file which the script compares to the found subnets in the snmp data of the firewall.

Now for my question:
Is this a known issue? Are there any solutions to that?


Currently running on Nagios Core 4.5.7 with PNP4Nagios 0.6.25 on CentOS 7 (not recommended, I know).

Attached is a screenshot of a subnet that was just added today, 2h ago.
Another subnet was removed, now the new subnet has the graph of the old one.
pnp4nagios_perfdata.png
Thanks in advance!
Jan
User avatar
lgute
Posts: 415
Joined: Mon Apr 06, 2020 2:49 pm

Re: PNP4Nagios mixes up performance data of IP subnets

Post by lgute »

Hi @JaMo, thanks for reaching out.

I am looking into this issue and will let you know when I have more information.
Please let us know if you have any other questions or concerns.

-Laura
User avatar
lgute
Posts: 415
Joined: Mon Apr 06, 2020 2:49 pm

Re: PNP4Nagios mixes up performance data of IP subnets

Post by lgute »

Hi @JaMo,

What plugin are you using to run your checks?

If the plugin is changing the ordering of the performance data, that would cause the issue you are seeing.
Please let us know if you have any other questions or concerns.

-Laura
JaMo
Posts: 3
Joined: Thu Jul 21, 2022 8:47 am

Re: PNP4Nagios mixes up performance data of IP subnets

Post by JaMo »

Hi @lgute,

I am using my own plugin.

Do you think sorting the performance data before outputting it would help?
If so, I can change the behavior.

You can see the script here:
https://pastebin.pl/view/bf12448c
User avatar
lgute
Posts: 415
Joined: Mon Apr 06, 2020 2:49 pm

Re: PNP4Nagios mixes up performance data of IP subnets

Post by lgute »

Hi @JaMo,

If sorting the data would keep the performance data in a consistent order, I would give that a try.
Please let us know if you have any other questions or concerns.

-Laura
JaMo
Posts: 3
Joined: Thu Jul 21, 2022 8:47 am

Re: PNP4Nagios mixes up performance data of IP subnets

Post by JaMo »

After sorting the performance data, the graphs are consistent.

Thanks for your help!
User avatar
lgute
Posts: 415
Joined: Mon Apr 06, 2020 2:49 pm

Re: PNP4Nagios mixes up performance data of IP subnets

Post by lgute »

Hi @JaMo,

Thanks for the update. Great to hear that the performance data/graphs are now working correctly.

I'm going to lock this thread and mark it resolved, so others may with similar problems can find it.
Please let us know if you have any other questions or concerns.

-Laura
Locked