Monitoring 9

Zabbix Jenkins HTTP API 연동

Jenkins 4 특정 job의 마지막 build 결과 확인이 필요하여 진행한 내용을 정리한 것이며, 예전 4버전 기준으로 작성합니다. 1. Item 탭에서, 1) Name: 적절히 설정 2) Type: HTTP agent 3) Key: 적절히 설정 4) URL: Jenkins HTTP API URL 입력 ex) http://jenkins서버/job/작업명/lastBuild/api/json 5) Convert to JSON 은 체크하지 않습니다. (결과가 json이라 혼동 가능하나, 설정하지 않아야 합니다.) 6) HTTP authentication: Basic 7) User name: 연동용 Jenkins 계정명 8) Password: 연동용 Jenkins 계정 token ※ Jenkins 관리 - M..

Monitoring 2024.03.12

Zabbix 로그 파일 모니터링

예전 4버전 기준으로 작성합니다. 1) Name은 적절히 설정합니다. 2) Type: Zabbix agent (active) ※ active 모드 설정시, /etc/zabbix 아래 등에 있는 zabbix_agentd.conf 에서 아래 설정을 추가 후, 재시작해야 합니다. ① ServerActive=Zabbix서버IP ② hostname=Zabbix서버에등록된현재서버명 3) Key : logrt.count["/로그파일경로/파일명.log","찾을문자열"] ex) /tmp/log_20240312.log 파일에서 error 개수를 찾는 경우, logrt.count["/tmp/log_[0-9]{8}.log","error"] 로 설정 가능 ※ logrt.count 는 log file rotation 등으로 날짜..

Monitoring 2024.03.12

[Nagiosgraph] 0~100% 까지 그래프 범위 고정하기

action_url 의 두개의 주소(기본, rel)에 아래 파라미터 추가&rrdopts=-l+0-m+100-r 1. 개별 지정define service{ use local-service,graphed-service-percentage action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&rrdopts=-l+0-m+100-r' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='/nagiosgraph/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&rrdopts=-l+0-m+100-r ho..

Monitoring 2014.06.30

[Nagiosgraph] customize graph (ex: check_disk -> disk usage percentage)

상황: 기본 설정으로는 사용한 용량(MB)이 그래프로 나오고 있음 -> 남은 용량 % 로 보여주는 것이 필요함 1. /nagiosgraph/etc/map -> 가져온 성능 정보를 rrd 파일로 mapping 하여 만드는 규칙 파일 수정(반복 구문으로 유연하게 만들어야 하는데 구문을 완전히 이해 못해서 일단 무식하게...)# Service type: check_oracle_disk# output:DISK OK - free space: /data1 623702 MB (99% inode=99%); /output:DISK (\w+) - free space: (\S+) (\d+) MB \((\d+)% \S*\): (\S+) (\d+) MB \((\d+)% \S*\): (\S+) (\d+) MB \((\d+)% \..

Monitoring 2014.06.27

Nagios Disable Basic Authentication

tcpwrapper 나 iptables(Linux), ipfilter(Solaris) 등으로 기본적인 보안 처리를 한 상태라서apache의 basic auth 끄고자 할 때의 설정 방법입니다. 1. Apache 의 httpd.conf 파일에서 Auth 관련 부분을 주석처리# SSLRequireSSL Options ExecCGI AllowOverride None Order deny,allow Deny from all Allow from IP 리스트 (접근 허용)# AuthName "Nagios Access"# AuthType Basic# AuthUserFile /usr/local/nagios/etc/htpasswd.users# Require valid-user... nagiosgraph, nagvis 등의..

Monitoring 2014.06.27

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

Nagios + NRPE (NSCP) 사용시 allow argument 오류가 나올 때 조치 * 모니터링 대상 호스트 (아래 변경 작업후 nrpe[xinetd], nsclient++ 서비스 재기동 필요)1) WindowsC:\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 li..

Monitoring 2014.05.22

CHECK_NRPE: Error - Could not complete SSL handshake.

# /usr/local/nagios/libexec/check_nrpe -H localhostCHECK_NRPE: Error - Could not complete SSL handshake.# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1NRPE v2.15 처음에 localhost 로 테스트하는데 제목과 같은 메시지가 나와서 당황했던 기억이 있어 기록합니다. local 테스트시 대상 Host 주소는 세팅과 일치해야 합니다.그래도 위와 같이 메시지가 나온다면 아래 설정들을 확인해봐야 한다고 하네요. 1) iptables, tcp_wrapper 등이 설정 확인 (기본 포트: 5666 accept 하는지)2) 내부에서 사용하는 SSL 라이브러리 확인 (32/64bit 여..

Monitoring 2014.05.22