Nagios and NSCA (for Munin)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Nagios and NSCA (for Munin)

Post 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
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Nagios and NSCA (for Munin)

Post by gshergill »

Hi Nagios Community,

Is NSCA needed for this plugin to work?
Thanks.

Kind Regards,

gshergill
Last edited by gshergill on Wed Aug 22, 2012 3:42 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios and NSCA (for Munin)

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Nagios and NSCA (for Munin)

Post 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
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Nagios and NSCA (for Munin)

Post 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
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Nagios and NSCA (for Munin)

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios and NSCA (for Munin)

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios and NSCA (for Munin)

Post 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

Code: Select all

iptables -L
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Nagios and NSCA (for Munin)

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios and NSCA (for Munin)

Post by scottwilkerson »

can you run this on the XI machine

Code: Select all

netstat -l -n|grep 5667
And this on the munin machine

Code: Select all

telnet <XI_IPADDRESS> 5667
and post the results
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked