Nagios and off site Windows monitoring
Re: Nagios and off site Windows monitoring
Great! I'll give them a read over.
Thank you.
Thank you.
Re: Nagios and off site Windows monitoring
No Problem.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios and off site Windows monitoring
Right, I have upgraded the Nagio 4.0.8 and I have followed the NSCA install guide but I'm having a problem that I can't figure out. The ./configure script and make all script seem to run fine and after make all is run it says it completed fine:
But the file that is meant to be copied to /usr/local/nagios/bin does not exist. The NSCA file it says to copy is no where to be found. Has anyone else had this problem?
Code: Select all
make all
cd ./src/; make all ; cd ..
make[1]: Entering directory `/home/futuresign/Downloads/nagios/nsca-2.9.1/src'
gcc -g -O2 -DHAVE_CONFIG_H -o nsca ./nsca.c ./netutils.c ./utils.c -lnsl
./nsca.c: In function ‘handle_connection’:
./nsca.c:1039:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
syslog(LOG_ERR,"Only able to send %d of %d bytes of init packet to client\n",rc,sizeof(send_packet));
^
./nsca.c: In function ‘write_checkresult_file’:
./nsca.c:1246:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘time_t’ [-Wformat=]
fprintf(checkresult_file_fp,"file_time=%d\n\n",current_time);
^
./nsca.c: In function ‘main’:
./nsca.c:153:9: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
getcwd(config_file,sizeof(config_file));
^
./nsca.c: In function ‘write_pid_file’:
./nsca.c:1447:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd,pbuf,strlen(pbuf));
^
./nsca.c:1448:9: warning: ignoring return value of ‘fchown’, declared with attribute warn_unused_result [-Wunused-result]
fchown(fd,usr,grp);
^
In file included from /usr/include/fcntl.h:279:0,
from ./../include/config.h:134,
from ./../include/common.h:24,
from ./nsca.c:19:
In function ‘open’,
inlined from ‘read_config_file.constprop.6’ at ./nsca.c:480:48:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
__open_missing_mode ();
^
make[1]: *** [nsca] Error 1
make[1]: Leaving directory `/home/futuresign/Downloads/nagios/nsca-2.9.1/src'
*** Compile finished ***
If the compile finished without any errors, you should
find client and server binaries in the src/ subdirectory.
Read the README file for more information on installing
the binaries, creating configuration files, and using
the server and client.
Re: Nagios and off site Windows monitoring
Ok I tried 2.7.2 and it made the files correctly. I will use that instead of 2.9.1.
Re: Nagios and off site Windows monitoring
What OS and it's version are you trying to compile it on?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios and off site Windows monitoring
Ok I managed to get it all working and listening on port 5667 as netstat showed and also the test message went through fine but I had to create the services.cfg file they mention in the tutorial where I added the service and definition like they said but after restarting Nagios I do not get any extra read outs in the services section on the webUI. Is the services.cfg somewhere else or should I have had to create it myself?
Re: Nagios and off site Windows monitoring
Sorry I didn't see your message, I'm compiling it on Linux server 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux.tgriep wrote:What OS and it's version are you trying to compile it on?
But 2.7.2 works fine by the looks of it.
I added the services.cfg location to the nagios.cfg file and the line appeared in the WebUI as pending, just playing the waiting game now to see if it comes up, may take an hour for the first time as stated in the documentation. Hopefully it works.
Re: Nagios and off site Windows monitoring
Another quick update, I ditched the services.cfg as I realised I could have put that information in the template.cfg and the passive check command in the windows.cfg and localhost.cfg so I did and it appears to be the same thing. Back to waiting now.
Re: Nagios and off site Windows monitoring
You can run this to see if the system is receiving data on port 5667.
Code: Select all
tcpdump port 5667
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios and off site Windows monitoring
Well that's a bummer, I get no feed back when I run that command. I'm not running iptables or anything. When I run:tgriep wrote:You can run this to see if the system is receiving data on port 5667.Code: Select all
tcpdump port 5667
Code: Select all
netstat -tunpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 729/smbd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1080/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1246/master
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 729/smbd
tcp 0 0 0.0.0.0:5667 0.0.0.0:* LISTEN 1745/nsca
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1224/mysqld