Switch&Router / NCPA wizards - interface name and direction
Re: Switch&Router / NCPA wizards - interface name and direct
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.
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
Please replace the file below with the one's I've attached:
Then run through the Switch Wizard again, selecting Alias on the first page under Monitor Using.
Let us know the results.
Code: Select all
/usr/bin/cfgmaker
/usr/local/nagiosxi/html/includes/configwizards/switch/switch.inc.php
Let us know the results.
You do not have the required permissions to view the files attached to this post.
Re: Switch&Router / NCPA wizards - interface name and direct
@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)
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.
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:
Code: Select all
chmod a+x cfgmaker
(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
Re: Switch&Router / NCPA wizards - interface name and direct
That period means there are possible SELinux permissions applied.
See here:
https://serverfault.com/a/304529
What is the output of these commands:
See here:
https://serverfault.com/a/304529
What is the output of these commands:
Code: Select all
sestatus
getenforce
Re: Switch&Router / NCPA wizards - interface name and direct
We normally disable SELinux:
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.
Code: Select all
# sestatus
SELinux status: disabled
# getenforce
Disabled
Re: Switch&Router / NCPA wizards - interface name and direct
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
@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.
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
I think removing the /bytes_recv should do it for NCPA unless I'm missing something:
VS:
Note the output differences, adjust the thresholds as needed.
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;
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;
Re: Switch&Router / NCPA wizards - interface name and direct
@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.
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
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