Page 2 of 2
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 12:52 pm
by snapon_admin
No, not about this particular host. I get a couple of warnings about 2 hosts that are no longer in Nagios, but that's just because I haven't removed them from the mrtg.cfg file yet.
Edit: For good measure I removed those 2 hosts that no longer exist anyway, and now I get no errors or warnings when I run that command.
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 1:28 pm
by sreinhardt
At it again are we?

Since your permissions look fine on the mrtg.conf file, what are the permissions on the directory?
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 1:33 pm
by snapon_admin
Haha, yep. This time is final though. I told the other net admin if we go back to mrtg we're staying there, lol. So now I just need to make it work and we'll be good.
Code: Select all
[root@lisl-ngos-01-pv mrtg]# ll -d /etc/mrtg
drwxrwxr-x. 4 apache nagios 4096 Feb 28 12:32 /etc/mrtg
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 1:35 pm
by sreinhardt
Do you have selinux enabled? My guess is no, but that period at the end of your command says that the folder here has extended context permissions set for that folder at the very least, which could cause issues.
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 1:50 pm
by snapon_admin
Code: Select all
[root@lisl-ngos-01-pv mrtg]# ll -Zd /etc/mrtg
drwxrwxr-x. apache nagios system_u:object_r:mrtg_etc_t:s0 /etc/mrtg
[root@lisl-ngos-01-pv mrtg]# ll -Z /etc/mrtg
drwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 bkp_cfg
drwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 conf.d
-rwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 mrtg.bkp
-rwxrwxr-x. apache nagios system_u:object_r:mrtg_etc_t:s0 mrtg.cfg
-rwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 mrtg.cfg.bkp
-rwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 mrtg.cfg_l_16654
-rwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 mrtg.ok
-rwxrwxr-x. apache nagios system_u:object_r:mrtg_etc_t:s0 router.cfg
-rwxrwxr-x. apache nagios system_u:object_r:mrtg_etc_t:s0 router.ok
-rwxrwxr-x. apache nagios unconfined_u:object_r:mrtg_etc_t:s0 separate_mrtg_cfgs
And remember I'm still learning on the fly with linux, but I learn fast. I think this is how to check if selinux is enabled, and it looks like yes?
Code: Select all
[root@lisl-ngos-01-pv mrtg]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@lisl-ngos-01-pv mrtg]#
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 1:56 pm
by sreinhardt
OK, permissive is good at least it should be allowing everything, even items that would be denied if it was fully enforcing. Are you seeing any errors in the audit log around the time you run the wizard? No worries on the learning, everyone has to start there at some point!
Code: Select all
grep -R- 'mrtg' /var/log/audit/audit.log
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 2:14 pm
by snapon_admin
Is 'grep -R-' a valid option? Never seen -R- and it didn't seem to like that option. I tried that command with grep -R and got the attached results.
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 3:18 pm
by slansing
I am a bit curious, if you add another device via the wizard, say.. a windows box even, do you get valid bandwidth data back? Can you test a port failure scenario with this switch to see if Nagios properly picks that up? It sounds like this is mainly a bandwidth issue, just hoping that it is restricted to that and not something entirely different. Also, silly question, but you do know for a fact that there is traffic on those interfaces correct?
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Fri Feb 28, 2014 4:49 pm
by snapon_admin
if you add another device via the wizard, say.. a windows box even, do you get valid bandwidth data back?
Yes, I just added a switch and got bandwidth data back within 5 minutes
Can you test a port failure scenario with this switch to see if Nagios properly picks that up?
Not really. These are our managed MPLS routers. Our carrier manages them, we only have read access to the routers, and there's really no ports we can shut down to test a failed port scenario.
Also, silly question, but you do know for a fact that there is traffic on those interfaces correct?
Yes, I can see traffic on the CLI for the router, just not in Nagios.
Re: Switch wizard adding everything except entry in mrtg.cfg
Posted: Mon Mar 03, 2014 11:47 am
by slansing
Hmm, this should be fixed in 2012 r2.9, but changes would have to be made to the current mrtg configurations, in your original mrtg.cfg, does it have a line specifying something along the lines of:
If the switch you added was assigned to a different MRTG.cfg file, the fastest way to resolve this would be to include that config file in the original mrtg.cfg file, so it reads both in.