Page 2 of 2
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Wed Sep 25, 2019 3:06 am
by solarmon
Hi
@ssax
Thanks for the update and clarification. I wasn't sure whether you were a developer - but you have clarified your position and the scope of this thread.
Thank you making the feature requrest on my behalf - I wasn't sure of the process for that.
I'm happy to make any changes required to get this feature working and fully accept that this has to be done manually until the feature is released officially.
Please let me know what I need to do to get this feature working.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Wed Sep 25, 2019 4:55 pm
by ssax
Please replace the file below with the one's I've attached:
Code: Select all
/usr/bin/cfgmaker
/usr/local/nagiosxi/html/includes/configwizards/switch/switch.inc.php
Then run through the Switch Wizard again, selecting Alias on the first page under Monitor Using.
Let us know the results.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Thu Sep 26, 2019 3:39 am
by solarmon
@ssax
Thank you!
I have replaced those files (making backup of originals) and can confirm that I am able to use the wizard to create the interfaces of Windows hosts using the interface Alias name.
Note, I had to make the follow tweaks.
Set ownership:
cfgmaker (root.root)
switch.inc.php (nagios.nagios)
Set permissions:
I notice that the permissions of the original cfgmaker has a "." at the end of it:
(using ls -Z)
Code: Select all
-rwxr-xr-x root root ? cfgmaker
-rwxr-xr-x. root root system_u:object_r:bin_t:s0 cfgmaker.orig
I don't know how to set this "system_u:object_r:bin_t:s0" permission but the wizard seems to be working OK once I set the executable permission for it.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Thu Sep 26, 2019 3:29 pm
by ssax
That period means there are possible SELinux permissions applied.
See here:
https://serverfault.com/a/304529
What is the output of these commands:
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Fri Sep 27, 2019 2:42 am
by solarmon
We normally disable SELinux:
Code: Select all
# sestatus
SELinux status: disabled
# getenforce
Disabled
So I'm not too worried about this particular issue, considering it is all working as expected. Just wanted to understand what it meant, so thank you for the link.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Fri Sep 27, 2019 2:05 pm
by ssax
No problem, glad to help! Is that going to work for you (the switch wizard updates)?
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Mon Sep 30, 2019 2:43 am
by solarmon
@ssax
Yes, I am happy with the wizard update and the manual update process. I hope this feature will be added officially.
The only reason why I'm using this switch/script wizard is because the NCPA agent does not combine the inbound and outbound performance stats. But the NCPA method allows us to create service templates. However, with the switch/script wizard actually creates the configs for MRTG and then creates a service that points to it - so it cannot be templated.
Ultimately, I would like the NCPA script/agent to support combining the interface inbound/outbound performance stats.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Mon Sep 30, 2019 2:13 pm
by ssax
I think removing the
/bytes_recv should do it for NCPA unless I'm missing something:
Code: Select all
[root@xid libexec]# /usr/local/nagios/libexec/check_ncpa.py -H X.X.X.X -t 'xxxxx' -P 5693 -M 'interface/MyActualAdapterName' -d -u M -w 10 -c 100
OK: Bytes_sent was 0 MB/s (Dropin: 0 packets/s, Bytes_recv: 0 MB/s, Packets_recv: 0 packets/s, Dropout: 0 packets/s, Errout: 0 errors/s, Errin: 0 errors/s, Packets_sent: 0 packets/s) | 'bytes_sent'=0;10;100; 'dropin'=0;10;100; 'bytes_recv'=0;10;100; 'packets_recv'=0;10;100; 'dropout'=0;10;100; 'errout'=0;10;100; 'errin'=0;10;100; 'packets_sent'=0;10;100;
VS:
Code: Select all
[root@xid libexec]# /usr/local/nagios/libexec/check_ncpa.py -H X.X.X.X -t 'xxxxx' -P 5693 -M 'interface/MyActualAdapterName/bytes_recv' -d -u M -w 10 -c 100
OK: Bytes_recv was 0 MB/s | 'bytes_recv'=0;10;100;
Note the output differences, adjust the thresholds as needed.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Tue Oct 01, 2019 3:43 am
by solarmon
@ssax
Thank you for testing the check_ncpa.py script.
However, this is fine if you manually create a service check, but the problem is that the NCPA
wizard itself automatically creates the separate service checks.
There is no option is the NCPA wizard to combine inbound and outbound traffic.
Re: Switch&Router / NCPA wizards - interface name and direct
Posted: Tue Oct 01, 2019 4:50 pm
by ssax
Ah, good point!
Code: Select all
FR: XI - NCPA Wizard - Interfaces - Add the ability to use combined inbound/outbound instead of having separate Inbound/Outbound services