Mail notification for Script Completes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Mail notification for Script Completes

Post by gm_rajkumar »

I'm running from local windows shell script to take SharePoint backup. Its auto scheduled in Windows Task manager.
We would like to have an email alert through Nagios, whether backup success or failed . Is this possible to do it Nagios??

Regards,
Raj.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notification for Script Completes

Post by scottwilkerson »

there are a couple ways to do this.

One would be to use a script to call a script from NSClient to check that you have files that are new enough in your backup directory
http://exchange.nagios.org/directory/Pl ... TK/details

Another method would be to have your backup script report the error to your XI server via NSCA or NRDP
http://exchange.nagios.org/directory/Ad ... nt/details
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Mail notification for Script Completes

Post by gm_rajkumar »

Its quite impressive, i wanted to know further into this..
http://exchange.nagios.org/directory/Pl ... TK/details

I have downloaded the check_win file and executed in the client machine and its working fine. I just wanted how this would be communicated with Nagios server and let me know the steps configure whether its NSC.ini file or somewhere. Thanks!!


Regards,
Rajkumar M.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Mail notification for Script Completes

Post by slansing »

This plugin would be called from the Nagios system much like any other NRPE plugin, you would follow the same steps to add it to the plugins folder on your windows machine, then define it like the others in your NSC.ini file, and call it using check_nrpe on the nagios machine.
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Mail notification for Script Completes

Post by gm_rajkumar »

Hi,

Thanks for the plugin first, i wanted to have further in this. In the backup folder, there are multiple folders that are created in the name of Current date (27-11-2012) backup files were stored on this. I wanted to make this script to check the folder name (date) should be created or not and files.

This specific script validate the files whether created on date and file counts. Is there any option to check the folder name??

Thanks!
Regards,
Raj.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notification for Script Completes

Post by scottwilkerson »

Do you mean check if the folder exists?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

Re: Mail notification for Script Completes

Post by gm_rajkumar »

I wanted to check whether folder is present which matches with my constrain (current date 27-11-2012), this plugin helps to count files only with limited features.
Do you have any plugin to check folder present on specific path & age??
Regards,
Raj.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notification for Script Completes

Post by scottwilkerson »

I couldn't find any, you certainly could create one...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked