Hi,
i am administrator at Nagios Xi version 5.3.2 VM,our case as below
we have server win 2012 VM we need to check file exist it by using Nagios features
• Checking whether no records inserted into this log file and send alarm to server administartor the location on server is D:\xxx\20161023-Sms.log the file create every 24 hours
i need to help me to fill the check command and command view as attached file
thanks
Manage Plugins
-
bashar.abed
- Posts: 153
- Joined: Tue Oct 11, 2016 1:34 am
- Location: Ramallah West Bank Palestine
- Contact:
Manage Plugins
You do not have the required permissions to view the files attached to this post.
Re: Manage Plugins
Do you have NSClient++ installed on the client machine already? If not, uou'll want to do so, and then look at the check_files option which can do exactly what you're after. https://docs.nsclient.org/reference/win ... heck_files
Former Nagios Employee
-
bashar.abed
- Posts: 153
- Joined: Tue Oct 11, 2016 1:34 am
- Location: Ramallah West Bank Palestine
- Contact:
Re: Manage Plugins
Hi,
NSClient++ already installed on the client machine,just i want to fill the Service Management (check commands and command view)
for example in other service check commands/check_nrpe ,command view $USER1$/check_nrpe -H $HOSTADDRESS$ -t 180 -c $ARG1$ $ARG2$
thanks
NSClient++ already installed on the client machine,just i want to fill the Service Management (check commands and command view)
for example in other service check commands/check_nrpe ,command view $USER1$/check_nrpe -H $HOSTADDRESS$ -t 180 -c $ARG1$ $ARG2$
thanks
Re: Manage Plugins
Take a look at this link - http://sites.box293.com/nagios/guides/c ... es-folders
Depending on your NSClient++ version, this is the section to look for -
Depending on your NSClient++ version, this is the section to look for -
Code: Select all
Make Sure A Specific File Exists
Check for a specific file in a folder. Generate a critical alert if file is not found.
Former Nagios Employee
-
bashar.abed
- Posts: 153
- Joined: Tue Oct 11, 2016 1:34 am
- Location: Ramallah West Bank Palestine
- Contact:
Re: Manage Plugins
Hi,
Many thanks for info and documents, but I need the command to check the file if the size is 0 send critical if not send normal .
Many thanks for info and documents, but I need the command to check the file if the size is 0 send critical if not send normal .
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Manage Plugins
That is covered in the document, see the section: Files Greater Than A Size
Also please note checking if a file exists is a very different requirement that checking if it is > 0 bytes.
Also please note checking if a file exists is a very different requirement that checking if it is > 0 bytes.
Previous Nagios employee
-
bashar.abed
- Posts: 153
- Joined: Tue Oct 11, 2016 1:34 am
- Location: Ramallah West Bank Palestine
- Contact:
Re: Manage Plugins
I read your the document, my case is the system generate a file if the file didn't write any word it is critical
So what is suitable command to check it
Thanks for help
So what is suitable command to check it
Thanks for help
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Manage Plugins
As noted above by rkennedy, this depends on your NSClient++ version. Please see the section Files Greater Than A Size for example commands by version.
For example, the shown command check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\NO BACKUP' pattern=*.* 'filter=size gt 500M' 'critical=count>0' 'detail-syntax=%(filename): %(size)' 'empty-state=ok'
will check 192.168.142.1 "C:\NO BACKUP" for files larger than 500 MB. If such a file is found, a Critical state is raised in Nagios.
You can find more detail here:
https://docs.nsclient.org/0.4.3/samples/#check-files
For example, the shown command check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\NO BACKUP' pattern=*.* 'filter=size gt 500M' 'critical=count>0' 'detail-syntax=%(filename): %(size)' 'empty-state=ok'
will check 192.168.142.1 "C:\NO BACKUP" for files larger than 500 MB. If such a file is found, a Critical state is raised in Nagios.
You can find more detail here:
https://docs.nsclient.org/0.4.3/samples/#check-files
Previous Nagios employee