Check_nwc_health interface-usage in a HA Icinga2 setup


#1

Hi there,

I’m struggling with check_nwc_health and data the plugin puts in /var/tmp/check_nwc_health/ in a I2 HA setup.

I need to run the plugin in mode “list-interfaces” to create the data the plugin needs in /var/tmp/ before I get a valid output, before that I get a “UNKNOWN- no interfaces.”.

Is there somebody out there running the plugin fine in a Icinga2 HA setup to query for interface stats?

Cheers,
Chris

P.S.: I tried my luck before in the previous forum: post256817


(Carsten Köbke) #2

Use GlusterFS for temp. plugin data in a HA setup.
Beside that i would open a issue at github to solve your main problem.
Normaly you should be able to run the plugin directly without the need of list all interfaces before.
Can you please post the full commandline you use and also your icinga service configuration for the interfaces.

Cheers,
Carsten


(Gerhard Laußer) #3

You can tell the plugin to write temporary data in an alternative directory by using --statefilesdir.
But it has to be mounted on every cluster node.

Gerhard


#4

Hi Gerhard,

thanks for the reply.

Will this in future change, to be able to run the plugin without the requirement to have an underlaying cluster filesystem?

Cheers,
Chris


#5

Hi Gerhard,

I’ve setup a glusterfs filesystem between the two cluster nodes.

Still doesn’t seem to do the trick, without me having to run in mode “list-interfaces” first (after that everything works like expected).
Am I doing something wrong here?

Cheers,
Chris


#6

Is a clusterfs needed or would a NFS share do the job, too? I think NFS should work.


(Carsten Köbke) #7

NFS=single point of failure
Glusterfs is really easy to setup


#8

Thanks for the feedback.

The filesystem itself seems fine.

It seems the device statefiles don’t get created somehow?
Like I tried to say, if I run the check in mode “list-interfaces” the correct devices statefiles get created and in mode interfaces-usage, the correct interface statefiles are generated which results in a working check result… triggering 300+ list-devices manually or scripted seems wrong though…


(Carsten Köbke) #9

Which version of the plugin do you use?


#10

Revision 6.1.0.2. I’ll see if I can upgrade to a later one…


#11

I’ve upgraded to Revision 7.0.1.4 but seeing the same result.

Funny enough, I’ve got a similar check setup, using SNMPv3, which works.

Here the two Checks compared:

‘/usr/lib/nagios/plugins/check_nwc_health’ ‘–community’ ‘COMMUNSTRING’ ‘–hostname’ ‘192.168.2.1’ ‘–ifspeed’ ‘10000000’ ‘–mode’ ‘interface-usage’ ‘–name’ ‘eth1’ ‘–protocol’ ‘1’ ‘–statefilesdir’ ‘/mnt/nwc_tmp’

‘/usr/lib/nagios/plugins/check_nwc_health’ ‘–authpassword’ ‘AUTHPASS’ ‘–authprotocol’ ‘SHA’ ‘–hostname’ ‘192.168.1.1’ ‘–mode’ ‘interface-usage’ ‘–name’ ‘ge-0/1/11’ ‘–privpassword’ ‘PRIVPASS’ ‘–privprotocol’ ‘AES’ ‘–protocol’ ‘3’ ‘–statefilesdir’ ‘/mnt/nwc_tmp’ ‘–username’ ‘USER’

Only difference aprart from the SNMPv3 credentials is that no ifspeed limit is set, but I tried taking the ifspeed option off the SNMPv1 Check, still not wanting to work.

Somehow /mnt/nwc_tmp/_device:: isn’t created for the first check and I can’t see why.


#12

Oh, I’ve just tried using SNMPv2c instead of SNMPv1, which creates the needed /mnt/nwc_tmp/_device:: files and the Check succeedes.

Always thought v1 and v2c are so similiar that this doesn’t make a difference but apparently so.

Check is working like expected now.