Aug 15 2014
Still SMS and Email alert for Nagios ?
If you haven’t tried …..
We are using this cool thing for our team to receive Nagios alerts and track our alert status.
http://www.wisvia.com
Aug 15 2014
If you haven’t tried …..
We are using this cool thing for our team to receive Nagios alerts and track our alert status.
http://www.wisvia.com
Aug 1 2014
It makes sense to a lot of people to ask if Nagios has an API for external controls. As far as I know there isn’t one that’s well designed.
However, you can either find your way to submit your commands to nagios.cmd file directly Examples, or you can find out the Nagios web URL for the action you need to submit:
1. open your nagios web, go to the service and find the “Service Commands” box.
2. Right click on the action you want to perform through API and copy the address. Now you have the full URL for the action to your specific service. eg. the url for Disable active checks of this service is:
http://mynagios.com/nagios/cgi-bin/cmd.cgi?cmd_typ=6&host=test_host&service=firefox1
3. Last you need to find your own way to call this url when you want to disable active check on service “firefox1”.
For Linux you can use:
curl -d “cmd_typ=6&host=test_host&service=firefox1” “http://mynagios.com/nagios/cgi-bin/cmd.cgi” -u <nagiosweb_login>:<nagiosweb_password>
For Windows, use the following VBScritp:
browse_url
Jul 22 2014
Routing all mails to a smarthost :
assume the postfixconfig files live in /etc/postfix/main.cf
In/etc/postfix/main.cf add the line:
relayhost = my.smarthost.fqdn:587
Routing all mails for a specific domain to a smarthost :
Add a line to /etc/postfix/transport:
thedomain.com my.smarthost.fqdn:587
generate a postmap file :
postmap hash:/etc/postfix/transport
To use the transport file, add or edit a line in /etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
Restart Postfix and all mail. The mail for selected domains should go trough the Smarthost.
* Some MTA accepts mail submission on port 587 only while some accepts on port 25 only.
Jul 16 2014
Download: check_fileage
This is a NSClient++ addon script for Nagios that will check specific file age.
Returns Warning or Critical if file is older than specified minutes.
$ARG1$ : The file path eg. c:/temp/watchme.log *** this must be a 8.3 file format, if there is any space, it won’t work.
$ARG2$ : Warning level in minutes
$ARG3$ : Criticl level in minutes
Setup :
==============================
1. copy the vbscript to NSClient/script folder
2. edit nsclient.ini and add the follow segment
[/settings/external scripts/scripts]
check_fileage=cscript.exe //nologo //T:30 scripts\\check_fileage.vbs $ARG1$ $ARG2$ $ARG3$
3. create a new command in nagios
define command{
command_name check_fileage
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -u -c check_fileage -a $ARG1$ $ARG2$ $ARG3$
}
4. create your nagios service
define service{
use generic-service
host_name TEST_HOST
service_description -check file age
check_command check_fileage!c:/temp/watchme.log!10!20
}
don’t forget to reload nagios and restart nsclient.
Aug 15 2014
Wisvia demonstration video
a friend asked about the previous post about the Nagios push.
By Chris • Nagios • 0 • Tags: Nagios