Switch wizard adding everything except entry in mrtg.cfg
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Switch wizard adding everything except entry in mrtg.cfg
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.
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.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Switch wizard adding everything except entry in mrtg.cfg
At it again are we?
Since your permissions look fine on the mrtg.conf file, what are the permissions on the directory?
Code: Select all
ll -d /etc/mrtgNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Switch wizard adding everything except entry in mrtg.cfg
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
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Switch wizard adding everything except entry in mrtg.cfg
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.
Code: Select all
ll -Zd /etc/mrtg
ll -Z /etc/mrtgNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Switch wizard adding everything except entry in mrtg.cfg
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
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]#
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Switch wizard adding everything except entry in mrtg.cfg
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.logNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Switch wizard adding everything except entry in mrtg.cfg
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.
You do not have the required permissions to view the files attached to this post.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Switch wizard adding everything except entry in mrtg.cfg
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?
- snapon_admin
- Posts: 952
- Joined: Mon Jun 10, 2013 10:39 am
- Location: Kenosha, WI
- Contact:
Re: Switch wizard adding everything except entry in mrtg.cfg
Yes, I just added a switch and got bandwidth data back within 5 minutesif you add another device via the wizard, say.. a windows box even, do you get valid bandwidth data back?
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.Can you test a port failure scenario with this switch to see if Nagios properly picks that up?
Yes, I can see traffic on the CLI for the router, just not in Nagios.Also, silly question, but you do know for a fact that there is traffic on those interfaces correct?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Switch wizard adding everything except entry in mrtg.cfg
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.
Code: Select all
include: /etc/mrtg/mrtg.cfg.bkp