Check_nwc_health interface issue

Hello everyone, I have a problem monitoring an interface on a remote server with Centos. I have the same problem on all 6 newly set up servers.
CentOS Linux release 8.1.1911 (Core)

Syntax in /etc/nagios/nrpe.cfg
command [check_inter] = / usr / lib64 / nagios / plugins / check_nwc_health --hostname localhost --servertype linuxlocal --mode interface-usage --ifspeed 1000000

The process tries to write a file, but it already exists. This is the monitoringfile from the interface of local monitoring server.
Result in Icinga:
UNKNOWN - cannot create status dir /var/tmp/check_nwc_health! check your filesystem (permissions/usage/integrity) and disk devices, cannot write status file /var/tmp/check_nwc_health/localhost_device::interfaces::usage_ens160#ens1604c9184f37cff01bcdc32dc486ec36961! check your filesystem (permissions/usage/integrity) and disk devices, cannot create status dir /var/tmp/check_nwc_health! check your filesystem (permissions/usage/integrity) and disk devices, cannot write status file /var/tmp/check_nwc_health/localhost_device::interfaces::usage_lo#lo4c9184f37cff01bcdc32dc486ec36961! check your filesystem (permissions/usage/integrity) and disk devices, interface ens160 usage is in:0.00% (0.01bit/s) out:0.00% (0.01bit/s), interface lo usage is in:0.00% (0.00bit/s) out:0.00% (0.00bit/s) (down)
A newly installed Ubuntu18 server with the same syntax in nrpe.cfg works. I suspect an error in the syntax of the check_nwc_health file or in the perl environment (perl 5, version 26, subversion 3).
How can I fix this Problem?

Best Regards Rico

check your filesystem (permissions/usage/integrity) and disk devices, cannot write status file /var/tmp/check_nwc_health

Your check is not abel to create the needed temp folder for check execution. Since it is CentOS maybe selinux flags are the issue here.

No, the file exist only on Monitoringserver (Ubuntu) , the result should write in this file. No file has to be written on the remote server. This File on monitoringserver is used by an other Process, the Problem is: why does he want to use the file with the wrong name, normally IP_device :: interfaces :: usage_1XXXXXXXX is used.

.rw-r--r--      1   184      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_40#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   199      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_41#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   190      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_42#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   190      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_43#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   180      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_44#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   173      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_45#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   173      8 nagios nagios 19 Sep  2019  10.120.252.132_device::interfaces::usage_46#2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1 7,3Ki     16 nagios nagios 19 Sep  2019  10.120.252.132_interface_cache_2d7001566c2eaf0ea65882f31efb19e7
.rw-r--r--      1   193      8 nagios nagios 25 Feb 11:30  localhost_device::interfaces::usage_ens160#ens1604c9184f37cff01bcdc32dc486ec36961
.rw-r--r--      1   193      8 nagios nagios 25 Feb 11:30  localhost_device::interfaces::usage_lo#lo4c9184f37cff01bcdc32dc486ec36961

:slightly_smiling_face:

Regards Rico

Noone has a Solution so I closed This Topic
Regard Rico

Hello,

check the permissions on the remote server where the plugin runs. Either the file has wrong permission (never run plugins as root manualy) or the path itself has wrong permissions.

Regards,
Carsten