Monitoring

NRPE, NSCP(NSClient++) allow argument 설정

Lawmin 2014. 5. 22. 10:16
Nagios + NRPE (NSCP) 사용시 allow argument 오류가 나올 때 조치 


* 모니터링 대상 호스트 (아래 변경 작업후 nrpe[xinetd], nsclient++ 서비스 재기동 필요)

1) Windows

C:\Program Files\NSClient++\nsclient.ini 에서 아래 부분 추가


...


; Undocumented section

[/settings/default]


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

allowed hosts = 


[/settings/NRPE/server]

allow arguments = 1


; 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]


...


2) Linux

/usr/local/nagios/etc/nrpe.cfg 수정


# COMMAND ARGUMENT PROCESSING

# This option determines whether or not the NRPE daemon will allow clients

# to specify arguments to commands that are executed.  This option only works

# if the daemon was configured with the --enable-command-args configure script

# option.

#

# *** ENABLING THIS OPTION IS A SECURITY RISK! ***

# Read the SECURITY file for information on some of the security implications

# of enabling this variable.

#

# Values: 0=do not allow arguments, 1=allow command arguments


dont_blame_nrpe=1