Search found 10 matches
- Tue May 20, 2014 2:55 am
- Forum: Open Source Nagios Projects
- Topic: Problem with Macro
- Replies: 1
- Views: 747
Problem with Macro
Hi everybody, i made a little script which: 1. Send notifications to a text file which has name of YYYYMMDDHHMMSSNNNNNN of his creation 2. Verify the file and if it's OK a copy is made (file_OK) in the same folder else it send us a mail Here's the script #!/bin/bash Date=$(date +%Y%m%d%H%M%S%N) name...
- Mon May 19, 2014 7:43 am
- Forum: Open Source Nagios Projects
- Topic: Script in misccommands
- Replies: 3
- Views: 1070
Re: Script in misccommands
Which user were you testing this as? Does the nagios user have access to write to the temp files? Could you also list how it is defined in the service and command definitions? I now used the macros $NAGIOS_HOSTSTATE, $NAGIOS_HOSTNAME and now everything works fine. Thank you very much for your help !!
- Fri May 16, 2014 2:57 am
- Forum: Open Source Nagios Projects
- Topic: Script in misccommands
- Replies: 3
- Views: 1070
Script in misccommands
Hi everybody, i would like to call a script from misccommands.cfg. This script send notifications infos to a txt file, which is named according to YearMonthDayHourMinutesSecondsNanoseconds, and then this same file is copied in the same folder but with OK at the end of file. For services the code is ...
- Fri May 09, 2014 7:15 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
Yes,
Nconf didn't modify the contacts.cfg file,
so i did it manually
and
Eureka! the notifications are sent to a text file as i want to.
All is good.
Thanks to everybody
Nconf didn't modify the contacts.cfg file,
so i did it manually
and
Eureka! the notifications are sent to a text file as i want to.
All is good.
Thanks to everybody
- Wed May 07, 2014 8:42 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
Thanks to everybody,
the command works, i don't know how but it works.
Now the second phase of the project is to make an agent that will search and find in our text file the intresting datas and put it in a database.
Thanks for your help.
the command works, i don't know how but it works.
Now the second phase of the project is to make an agent that will search and find in our text file the intresting datas and put it in a database.
Thanks for your help.
- Wed May 07, 2014 2:50 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
What is the purpose of the macros at the end: I copy these macros from email notification command but i remove it and i try without it. The problem is to understand which is the right solution to send the notifications to a text file and not only to an email ? Because the log file is too big and i ...
- Tue May 06, 2014 3:51 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
How are you calling this script? As an event handler, or some other way? It looks like $HOSTNAME$ is the only populated macro I enter this script in my NConf plugin. It is saved in /etc/nagios/global/misccommand.cfg like this: define command{ command name notify-host-by-txt command_line /bin/echo -...
- Mon May 05, 2014 2:17 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
Thanks for your help, i enter these commands in my misccommands file: /bin/echo -e "HOST ALERT:\n\n Notification Type: $ NOTIFICATIONTYPE$\n Host: $HOSTNAME$\n State: $HOSSTATE$\n Address: $HOSTADDRESS$\n Info: $HOSTOUTPUT$\n Date/Time: $LONGDATETIME$\n" >> /tmp/notif_text.txt "HOST A...
- Wed Apr 30, 2014 2:43 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Re: Project of communication
No i wish Nagios send notifications to a temporary text file leavin the deafault email solution running. I put this in misccommands Does it work? what i have to put instead of $CONTACTEMAIL$ ? Thanks. "HOST ALERT:\n \n Notification Type: $NOTIFICATIONTYPE$\n Host: $HOSTNAME$\n State: $HOSTSTATE...
- Tue Apr 29, 2014 5:04 am
- Forum: Open Source Nagios Projects
- Topic: Project of communication
- Replies: 11
- Views: 3064
Project of communication
Hi everybody, I'm from France and excuse my english, I'm currently in a job training and my boss asked me to do a project. He wants that Nagios communicate his notifications towards an external software of IT asset management written in Java whiwh has a MySQL database. The goal is doing statistics a...