Page 1 of 5
Nagios and NSCA (for Munin)
Posted: Tue Aug 21, 2012 4:36 am
by gshergill
Hi Nagios Community,
I've managed to get Munin working and configured to check temperature's, fan speeds and voltage, which is perfect.
According to the Munin Exchange, it integrates perfectly with Nagios.
This is the guide I am using at the moment;
What I have done so far;
On NagiosXI server:
-> nsca already installed. xinetd already installed.
-> Configure
/etc/xinetd.d/nsca as requested.
-> Edit nsca.cfg to ensure correct
command_file reference.
-> Edit
send_nsca to add password.
On Munin server:
-> install nsca client. install nsca. install xinetd
-> Create and edit file
/etc/xinetd.d/nsca as requested.
-> Edit
send_nsca to add password.
-> Edit nsca.cfg to ensure correct
command_file reference.
So now, when i run the command as follows here are the results;
From Nagios server,
Code: Select all
/usr/local/nagios/libexec/send_nsca -H localhost -c /usr/local/nagios/etc/send_nsca.cfg
Error: Timeout after 10 seconds
From Munin server,
Code: Select all
/usr/sbin/send_nsca -H localhost -c /etc/send_nsca.cfg
Connection refused by host
Error: Could not connect to host localhost on port 5667
Not really sure what I need to do now, they both failed and no idea why.
Any help would be great please.
Thank you,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Tue Aug 21, 2012 9:40 am
by gshergill
Hi Nagios Community,
Is NSCA needed for this plugin to work?
Thanks.
Kind Regards,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Tue Aug 21, 2012 2:59 pm
by scottwilkerson
While I am not real familiar with munin, I did notice that in your test you tried this
gshergill wrote:From Munin server,
Code: Select all
/usr/sbin/send_nsca -H localhost -c /etc/send_nsca.cfg
Connection refused by host
Error: Could not connect to host localhost on port 5667
Which I would guess should be
Code: Select all
/usr/sbin/send_nsca -H <NAGIOSXI_IP> -c /etc/send_nsca.cfg
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 3:28 am
by gshergill
Hi scottwilkerson,
Unfortunately that comes with the same error from the Munin server;
Code: Select all
/usr/sbin/send_nsca -H 192.168.3.121 -c /etc/send_nsca.cfg
Connection refused or timed out
Error: Could not connect to host 192.168.3.121 on port 5667
Hopefully someone here can help with the Munin, am fast approaching a deadline for this.
Thank you.
Kind Regards,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 4:33 am
by gshergill
Hi Nagios Community,
Small update;
With no password added to
"send_nsca.cfg" it comes up with error in config file.
Adding password fixes it.
Then, with no password in
"nsca.cfg" the following error appears;
Code: Select all
# send_nsca -H localhost -c /usr/local/nagios/etc/send_nsca.cfg
Error: Server closed connection before init packet was received
Error: Could not read init packet from server
Adding a password fixes it, but creates the timeout error shown previously.
Both passwords match.
Thank you.
Kind Regards,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 4:45 am
by gshergill
Hi again,
Another quick update.
On the Nagios machine, edited the file
"/etc/xinetd.d/nsca" file, allowing from the munin server.
Running the command here is the output;
Code: Select all
# /usr/local/nagios/libexec/send_nsca -H 192.168.3.82 -c /usr/local/nagios/etc/send_nsca.cfg
Connection refused by host
Error: Could not connect to host 192.168.3.82 on port 5667
Hope that helps.
Kind Regards,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 9:40 am
by slansing
Hello gshergill,
Have you made absolutley sure that there is nothing obstructing that port on the Munin server from sending or receiving the NSCA information?
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 10:46 am
by scottwilkerson
To be clear you are running the send_nsca command from the munin server correct?
On the XI machine can you also run the following and post the output
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 11:37 am
by gshergill
Hi scottwilkerson,
The following is the output from iptables;
Code: Select all
[root@nagiosxi etc]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Hi slansing,
I'm not entire sure if there is anything obstructing it, how would I go about checking that?
I haven't added anything else to use that port.
Thank you.
Kind Regards,
gshergill
Re: Nagios and NSCA (for Munin)
Posted: Wed Aug 22, 2012 2:48 pm
by scottwilkerson
can you run this on the XI machine
And this on the munin machine
and post the results