nsclient.ini

# 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
[/settings/default]

; PASSWORD - Password used to authenticate against server
;password = LJ7UGBmNZrozJKLI

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 172.16.106.14,172.16.42.29
debug = 1


; Undocumented section
[/settings/NRPE/server]
allow arguments = true
allow_nasty_meta_chars = 1

; VERIFY MODE - Comma separated list of verification flags to set on the SSL socket.  default-workarounds	Various workarounds for what I understand to be broken ssl implementations no-sslv2	Do not use the SSLv2 protocol. no-sslv3	Do not use the SSLv3 protocol. no-tlsv1	Do not use the TLSv1 protocol. single-dh-use	Always create a new key when using temporary/ephemeral DH parameters. This option must be used to prevent small subgroup attacks, when the DH parameters were not generated using "strong" primes (e.g. when using DSA-parameters).   
ssl options = default-workarounds

; VERIFY MODE - Comma separated list of verification flags to set on the SSL socket.  none	The server will not send a client certificate request to the client, so the client will not send a certificate. peer	The server sends a client certificate request to the client and the certificate returned (if any) is checked. fail-if-no-cert	if the client did not return a certificate, the TLS/SSL handshake is immediately terminated. This flag must be used together with peer. peer-cert	Alias for peer and fail-if-no-cert. workarounds	Various bug workarounds. single	Always create a new key when using tmp_dh parameters. client-once	Only request a client certificate on the initial TLS/SSL handshake. This flag must be used together with verify-peer   
verify mode = none

; ALLOW INSECURE CHIPHERS and ENCRYPTION - Only enable this if you are using legacy check_nrpe client.
insecure = true
use ssl = false


; Undocumented section
[/modules]

; NRPEServer - A server that listens for incoming NRPE connection and processes incoming requests.
NRPEServer = 1

; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1

; NSClientServer - A server that listens for incoming check_nt connection and processes incoming requests.
NSClientServer = 1

; CheckExternalScripts - Execute external scripts
CheckExternalScripts = 1

; CheckHelpers - Various helper function to extend other checks.
CheckHelpers = 1

; NSCAClient - NSCA client can be used both from command line and from queries to submit passive checks via NSCA
NSCAClient = 1

; CheckEventLog - Check for errors and warnings in the event log.
CheckEventLog = 1

; CheckNSCP - Use this module to check the healt and status of NSClient++ it self
CheckNSCP = 1

; CheckDisk - CheckDisk can check various file and disk related things.
CheckDisk = 1

;CheckTaskSched = 1
CheckTaskSched = 1

[/settings/NRPE/server]
allow arguments=true
allow nasty characters=true

[/settings/external scripts]
allow arguments=true
allow nasty characters=true

; A list of templates for wrapped scripts.
%SCRIPT% will be replaced by the actual script an %ARGS% will be replaced by any given arguments.
[/settings/external scripts/wrappings]

; POWERSHELL WRAPPING - 
ps1 = cmd /c echo C:\Scripts\Nagios\%SCRIPT% %ARGS% ; exit($lastexitcode) | powershell.exe -command -

; BATCH FILE WRAPPING - 
bat = scripts\\%SCRIPT% %ARGS%

; VISUAL BASIC WRAPPING - 
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%

[/settings/external scripts/wrapped scripts]
;Remote ping
remote_ping = ping.bat "$ARG1$" "$ARG2$" $ARG3$ $ARG4$

;Check_IIS
CollectIISCounter = CollectIISCounter.ps1 localhost "$ARG1$" "$ARG2$" $ARG3$ $ARG4$
CheckIISAppPoolState = CheckIISAppPoolState.ps1 -ApplicationPool "$ARG1$"
CheckIISCounter = CheckIISCounter.ps1 -Server "localhost" -Website "$ARG1$" -CounterName "$ARG2$" -Warning_value $ARG3$ -Critical_value $ARG4$
CheckIISWebsiteState = CheckIISWebsiteState.ps1 -Website "$ARG1$"

; HYPER-V
check_hypv_conformite = check_hypv_conformite.ps1 $ARG1$
check_nb-vcpu = check_nb-vcpu.ps1

[/settings/external scripts/scripts]
check_print_spooler = cmd /c echo scripts\check-queue-printer.ps1; exit($lastexitcode) | powershell.exe -command -
check_fileage=cscript.exe //nologo //T:30 scripts\\check_fileage.vbs $ARG1$ $ARG2$ $ARG3$

; Exchanges
Check_bindings_log=cmd /c echo scripts\check_bindings_log.ps1; exit($lastexitcode) | powershell.exe -command -
check_testps=cmd /c echo scripts\powershell-test.ps1; exit($lastexitcode) | powershell.exe -command -
Exchange-serverComponentHealth=cmd /c echo scripts\Exchange-serverComponentHealth.ps1; exit($lastexitcode) | powershell.exe -command -
Exchange-serverPoolIIS=cmd /c echo scripts\Exchange-serverPoolIIS.ps1; exit($lastexitcode) | powershell.exe -command -
Exchange-serverCertificate=cmd /c echo scripts\Exchange-serverCertificate.ps1; exit($lastexitcode) | powershell.exe -command -
Exchange-serverDB=cmd /c echo scripts\Exchange-serverDB.ps1; exit($lastexitcode) | powershell.exe -command -

; Seal_logs
check_seal_log = cmd /c echo scripts\check_SEAL_log.ps1; exit($lastexitcode) | powershell.exe -command -

;Check_win_task
check_ms_win_tasks=cmd /c echo scripts\check_ms_win_tasks.ps1; $ARG1$; exit $LastExitCode | powershell.exe -command -

; A list of aliases available.
An alias is an internal command that has been predefined to provide a single command without arguments. Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]

; 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 = check_drivesize

; alias_volumes - Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes = check_drivesize

; 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 = check_tasksched show-all "syntax=${title}: ${exit_code}" "crit=exit_code ne 0"

; 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 = check_process "process=$ARG1$" "crit=state != 'stopped'"

; alias_service - Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service = check_service

; 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 = check_process "filter=is_hung" "crit=count>0"

; 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 = check_process "process=$ARG1$" "warn=count > $ARG2$" "crit=count > $ARG3$"

; alias_process - Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process = check_process "process=$ARG1$" "crit=state != 'started'"

; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem = check_memory

; 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 = check_files "path=$ARG1$" "crit=size > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${size}" max-dir-depth=10

; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = check_drivesize

; 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 = check_cpu "warn=load > $ARG1$" "crit=load > $ARG2$" time=5m time=1m time=30s

; 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 = check_files "path=$ARG1$" critical="age gt $ARG2$"
alias_file_age = check_files "path=$ARG1$" "crit=written > $ARG2$" "top-syntax=${list}" "detail-syntax=${filename] ${written}" max-dir-depth=10

; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = check_cpu

; 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 = check_eventlog

; 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 = check_service "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 = check_uptime

; 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 = check_drivesize

; 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 = check_tasksched show-all "filter=title eq '$ARG1$'" "detail-syntax=${title} (${exit_code})" "crit=exit_code ne 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 = check_tasksched "filter=status = 'running'" "detail-syntax=${title} (${most_recent_run_time})" "crit=most_recent_run_time < -$ARG1$"

Linux

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
#command[check_users]=/usr/lib/nagios/plugins/check_users $ARG1$
#command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$
#command[check_disk]=/usr/lib/nagios/plugins/check_disk $ARG1$
#command[check_swap]=/usr/lib/nagios/plugins/check_swap $ARG1$
#command[check_cpu_stats]=/usr/lib/nagios/plugins/check_cpu_stats.sh $ARG1$
#command[check_mem]=/usr/lib/nagios/plugins/custom_check_mem -n $ARG1$
### GENERIC SERVICES ###
#command[check_init_service]=sudo /usr/lib/nagios/plugins/check_init_service $ARG1$
#command[check_services]=/usr/lib/nagios/plugins/check_services -p $ARG1$
### SYSTEM UPDATES ###
#command[check_yum]=/usr/lib/nagios/plugins/check_yum
#command[check_apt]=/usr/lib/nagios/plugins/check_apt

### PROCESSES ###
#command[check_all_procs]=/usr/lib/nagios/plugins/custom_check_procs
#command[check_procs]=/usr/lib/nagios/plugins/check_procs $ARG1$

### OPEN FILES ###
#command[check_open_files]=/usr/lib/nagios/plugins/check_open_files.pl $ARG1$

### NETWORK CONNECTIONS ###
#command[check_netstat]=/usr/lib/nagios/plugins/check_netstat.pl -p $ARG1$ $ARG2$

### ASTERISK ###
#command[check_asterisk]=/usr/lib/nagios/plugins/check_asterisk.pl $ARG1$
#command[check_sip]=/usr/lib/nagios/plugins/check_sip $ARG1$
#command[check_asterisk_sip_peers]=sudo /usr/lib/nagios/plugins/check_asterisk_sip_peers.sh $ARG1$
#command[check_asterisk_version]=/usr/lib/nagios/plugins/nagisk.pl -c version
#command[check_asterisk_peers]=/usr/lib/nagios/plugins/nagisk.pl -c peers
#command[check_asterisk_channels]=/usr/lib/nagios/plugins/nagisk.pl -c channels
#command[check_asterisk_zaptel]=/usr/lib/nagios/plugins/nagisk.pl -c zaptel
#command[check_asterisk_span]=/usr/lib/nagios/plugins/nagisk.pl -c span -s 1
# SQUID
# - Retourne le nombre de connexions
UserParameter=squid.cnxnmbr,netstat -an|grep ":3128"|grep ESTABLISHED|wc -l

# Apache2
# - Retourne le nombre de connexions
UserParameter=apache2.nbcnxhttp,netstat -an|grep ":80 "|grep ESTABLISHED|wc -l
UserParameter=apache2.nbcnxhttps,netstat -an|grep ":443 "|grep ESTABLISHED|wc -l

# SMTP
# - Retourne le nombre de connexions
UserParameter=smtp.cnxnmbr,netstat -an|grep ":25 "|grep ESTABLISHED|wc -l

# Nginx
# - Retourne le nombre de connexions
UserParameter=nginx.nbcnxhttp,netstat -an|grep ":80 "|grep ESTABLISHED|wc -l
UserParameter=nginx.nbcnxhttps,netstat -an|grep ":443 "|grep ESTABLISHED|wc -l
UserParameter=nginx.nbcnxpops,netstat -an|grep ":995 "|grep ESTABLISHED|wc -l
UserParameter=nginx.nbcnximaps,netstat -an|grep ":993 "|grep ESTABLISHED|wc -l

# - Retourne le nombre de ports en écoute
UserParameter=nginx.listenhttp,netstat -an|grep ":80 "|grep LISTEN|wc -l
UserParameter=nginx.listenhttps,netstat -an|grep ":443 "|grep LISTEN|wc -l
UserParameter=nginx.listenpops,netstat -an|grep ":995 "|grep LISTEN|wc -l
UserParameter=nginx.listenimaps,netstat -an|grep ":993 "|grep LISTEN|wc -l

# - Retourne le nombres de MAJ en attentes
# - Avant Debian 9
UserParameter=apt.upgradable,aptitude search '~U' | wc -l
# - Apres Debian 9
UserParameter=apt.upgradable,yum list updates  2> /dev/null|tail -n +7|wc -l
# - CentOS
UserParameter=apt.upgradable,apt list --upgradeable  2> /dev/null|tail -n +2|wc -l