Hello XI Support
How we could configure EenetHandler to run TMP files cleanup script at Windows (NSClient) or Linux (NRPE) server end?
- any .sh file you've got and what would be the arguments?
Thank you
Event Handler to run cleanup script at server end
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Event Handler to run cleanup script at server end
Hello, @dlukinski. Do you only need help setting up the event handler or are you looking for a windows/linux script to clear out tmp files as well? If you do have scripts already, please upload them here, if you don't you need to find them or write your own. For linux I'm sure you could write a one-liner using shell to clear out some temp directory. On windows, you could use VB, Powershell Script or a Batch script. I'm not sure what is your criteria for deleting those files, but there should be some scripts online.
Let me know when you find the scripts and we can move forward to create the event handlers.
Let me know when you find the scripts and we can move forward to create the event handlers.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Event Handler to run cleanup script at server end
I am actually wondering if there is anything already exists for Nagios eventsnpolovenko wrote:Hello, @dlukinski. Do you only need help setting up the event handler or are you looking for a windows/linux script to clear out tmp files as well? If you do have scripts already, please upload them here, if you don't you need to find them or write your own. For linux I'm sure you could write a one-liner using shell to clear out some temp directory. On windows, you could use VB, Powershell Script or a Batch script. I'm not sure what is your criteria for deleting those files, but there should be some scripts online.
Let me know when you find the scripts and we can move forward to create the event handlers.
Logic is that once some DISK check threshold hits WARNING level, the event handler initiates the script
- need no script, just how to configure Nagios to run some .sh or .py / .cmd or .vbs at client end via the Handler
- how to configure handler comment?
Re: Event Handler to run cleanup script at server end
check_nrpe or check_by_ssh can be used to execute remote scripts. Essentially you just make a new command to either of these and they in turn run the clean up script.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers this. https://support.nagios.com/kb/article/n ... h-247.html and https://support.nagios.com/kb/article/n ... t-528.html have more details on setting up check_by_ssh and nsclient++ to run external scripts.
No sure what you mean by configuring handler comment - can you clarify?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers this. https://support.nagios.com/kb/article/n ... h-247.html and https://support.nagios.com/kb/article/n ... t-528.html have more details on setting up check_by_ssh and nsclient++ to run external scripts.
No sure what you mean by configuring handler comment - can you clarify?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Event Handler to run cleanup script at server end
I do not understand how to create comment for execution of the remote script (both Windows and Linux end)cdienger wrote:check_nrpe or check_by_ssh can be used to execute remote scripts. Essentially you just make a new command to either of these and they in turn run the clean up script.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers this. https://support.nagios.com/kb/article/n ... h-247.html and https://support.nagios.com/kb/article/n ... t-528.html have more details on setting up check_by_ssh and nsclient++ to run external scripts.
No sure what you mean by configuring handler comment - can you clarify?
Could we please schedule remote session for that (make it a ticket)?
- this is something we are planning to use globally and would like to get it done right the first time
Please help
You do not have the required permissions to view the files attached to this post.
Re: Event Handler to run cleanup script at server end
Assuming you're using nsclient++ you would want to create a command with a command line like "$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c <scriptname>" and use https://support.nagios.com/kb/article/n ... t-528.html to configure the client to execute it. If this doesn't help resolve the question, please open a ticket and we can schedule a remote if needed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.