Plugins
Plugins
Hi all,
i would like to know how to download the specific plugin and run it. For example, here is the plugin and i would like to use it. Because this plugin is missing in my directory /usr/local/nagios/libexec or simple i dont have it. Or for example i would like to use check_snmp_load but when i try to download for example with wget i dont have nothing and what after the download, what have to do to get it work, what have to add in command.cfg and what in switche.cfg or what ever ...
Tnx in advanced !
i would like to know how to download the specific plugin and run it. For example, here is the plugin and i would like to use it. Because this plugin is missing in my directory /usr/local/nagios/libexec or simple i dont have it. Or for example i would like to use check_snmp_load but when i try to download for example with wget i dont have nothing and what after the download, what have to do to get it work, what have to add in command.cfg and what in switche.cfg or what ever ...
Tnx in advanced !
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Plugins
In order to install a plugin such as the one you showed, you would simply wget the download URL into your /usr/local/nagios/libexec directory.
Most plugins offer a "-h" flag which will print a standard help listing explaining how to use the plugin, from here you can find the flags and required arguments the plugin needs to return check information. In the case of SNMP you will need to make sure you have the correct version number your device is running i.e "v1, v2" and it's community string interface, and port. It is recommended you first make sure you can return information from the Nagios server's shell before configuring the check into a host or service.
Most plugins offer a "-h" flag which will print a standard help listing explaining how to use the plugin, from here you can find the flags and required arguments the plugin needs to return check information. In the case of SNMP you will need to make sure you have the correct version number your device is running i.e "v1, v2" and it's community string interface, and port. It is recommended you first make sure you can return information from the Nagios server's shell before configuring the check into a host or service.
Re: Plugins
Hi,
i have some problems and i hope you all can gave me some explanation ... I have monitor some machines for hard drive capacity uptime and etc.. and for some machines the status and info is excellence, and for the others the status is "OK" but the status info is showing 0 for example: I have Server and for status gave me a warning and status info about the capacity is excellence "c: - total: 16.94 Gb - used: 15.05 Gb (89%) - free 1.89 Gb (11%)" ... also other machine it gave me an uptime status for that machine and its ok System Uptime - 20 day(s) 21 hour(s) 20 minute(s). Now i have other machine (connected with leased line, VPN) in other domain with domain users and i have installed NSClient ++ as administrator and for that machines i have status OK but the status info for example for Uptime is "System Uptime - 0 day(s) 0 hour(s) 0 minute(s) ". Also i have a router before that machines (off course
) and i monitor Uptime for that router and its fine. So the line is ok and i think is not a problem, the problem i think is domain or some other thinks. If you have any suggestions about it pleas shear wit us
i have some problems and i hope you all can gave me some explanation ... I have monitor some machines for hard drive capacity uptime and etc.. and for some machines the status and info is excellence, and for the others the status is "OK" but the status info is showing 0 for example: I have Server and for status gave me a warning and status info about the capacity is excellence "c: - total: 16.94 Gb - used: 15.05 Gb (89%) - free 1.89 Gb (11%)" ... also other machine it gave me an uptime status for that machine and its ok System Uptime - 20 day(s) 21 hour(s) 20 minute(s). Now i have other machine (connected with leased line, VPN) in other domain with domain users and i have installed NSClient ++ as administrator and for that machines i have status OK but the status info for example for Uptime is "System Uptime - 0 day(s) 0 hour(s) 0 minute(s) ". Also i have a router before that machines (off course
Re: Plugins
You mentioned a few different checks. What is the exact issue that you are having? Can you show us the exact check that you are running in the command line, along with the output of it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Plugins
Here is an example
http://imageshack.us/photo/my-images/80 ... shelp.jpg/
The second UpTime status showing that is 0 days 0 hours 0 minutes ... im using same plugin and im not change or modified just the name and ip of the host.
http://imageshack.us/photo/my-images/80 ... shelp.jpg/
The second UpTime status showing that is 0 days 0 hours 0 minutes ... im using same plugin and im not change or modified just the name and ip of the host.
Re: Plugins
Here is something interesting.... So i have installed nagios and configure on Ubuntu server 12.04 LTS that runs on VMware Player. I make copy of that virtual pc (like backup) so i can test other stuff and now im running that machine and experiment on that (learning)
. So i Power up the original one and put the same service for the same PC that i have problem ... and its work ok ... i have remember what i have change, and that is, in the cgi.cfg and in the nagios.cfg file i have change the time periods of refreshing and time period of checking the services and etc ... i have put back the defaults one back and now still cant get the right status information abut that two PC i have to get. I put new one on the (lets say the broken one)machine and it is OK it gave me the real status info abut UpTime service and etc ... all the PC are the same no different modification or something ... so what could be causing this problem on the again broken machine 
Re: Plugins
Are you issues specifically with the uptime check? If so, could you post your service check and the remote host's nrpe.cfg file?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Plugins
I dont have nrpe.cfg files on remote host's they are windows machines and im using the same version of NSClient++ same configuration and installation. I have change on some, not all, the community string/password. And no i have issues of other plugins like check_nt for checking the capacity of the hard drive.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Plugins
This sounds like SNMP based information, you supplied a screenshot regarding check_nrpe passed to your windows host. NRPE and SNMP are two different check types..I have change on some, not all, the community string/password
It appears as though you have given the wrong drive letter in the command definition for the check that was failing in the screen shot, can you show how you have the service defined?
Re: Plugins
Here it is from the windows.cfg
and in command.cfgdefine service{
use generic-service
host_name PC005
service_description Uptime
check_command check_nt!UPTIME -s PC5nagios
}
define service{
use generic-service
host_name PC005
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90 -s PC5nagios
}
and i have using NSClient++ on PC005 it is a big code but ill put it here the .ini file# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
Code: Select all
# If you want to fill this file with all avalible options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help
; Undocumented section
[/modules]
; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk = 1
; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog = 1
; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1
; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers = 1
; Check NSCP - Checkes the state of the agent
CheckNSCP = 1
; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1
; CheckWMI - CheckWMI can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckWMI = 1
; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1
; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1
; Undocumented section
[/settings/default]
; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 10.10.5.5
; PASSWORD - Password used to authenticate againast server
password = PC5nagios
; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]
; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
; alias_cpu_ex - Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
; alias_disk_loose - Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable
; alias_event_log - Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
; alias_file_age - Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
; alias_file_size - Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_file_size = CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
; alias_process - Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process = checkProcState "$ARG1$=started"
; alias_process_count - Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
; alias_process_hung - Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"
; alias_process_stopped - Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_process_stopped = checkProcState "$ARG1$=stopped"
; alias_sched_all - Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_sched_all = CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
; alias_sched_long - Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_sched_long = CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
; alias_sched_task - Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_sched_task = CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0
; alias_service - Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service = checkServiceState CheckAll
; alias_service_ex - Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_service_ex = checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
; alias_up - Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_up = checkUpTime MinWarn=1d MinWarn=1h
; alias_updates - Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
alias_updates = check_updates -warning 0 -critical 0
; alias_volumes - Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
; alias_volumes_loose - Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable
; default - Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
default =