Monitoring 12

Zabbix 4 → 7 업그레이드 이전

1. 신규 서버 또는 VM에 OS 설치합니다. 2. 신규 서버에 MySQL DB(또는 MariaDB)를 설치합니다. 빠른 복원을 위해 몇가지 설정을 추가합니다.create database zabbix character set utf8mb4 collate utf8mb4_bin;create user zabbix@localhost identified by "암호";grant all privileges on zabbix.* to zabbix@localhost;set global log_bin_trust_function_creators = 1;set global innodb_flush_log_at_trx_commit=0;set global autocommit=0;set global unique_checks=0;s..

Monitoring 2024.12.12

Zabbix 4 Latest data HTTP 500 에러 발생 시

http://ZABBIX URL/latest.php?filter_rst=1 로 접속하면, 조회 조건이 초기화 되며 다시 접근 가능하게 됩니다. 근본적으로는,특정 조회 조건 처리 시, 서버 메모리(httpd-php)가 부족한 경우에 해당 문제가 발생하므로, (latest.php, overview.php 등)해당 조건으로 조회가 필요한 경우, php.ini 사용 메모리 증설 등의 조치가 필요합니다. 소규모 환경 (호스트 memory_limit = 256M중간 규모 환경 (호스트 1000~5000개, 사용자 10~50명):memory_limit = 512M대규모 환경 (호스트 > 5000개, 사용자 > 50명):memory_limit = 1024M ~ 2048M이후, httpd 나 apache 등을 재시작하여..

Monitoring 2024.11.26

Zabbix 4 서버 file open 개수 모니터링

1. 각 서버의 Zabbix agent 설정 변경open file 개수를 수집하도록 agent 설정 변경 (custom.file.open은 Key 로서, 임의 변경 가능)1) Linux 예시echo "UserParameter=custom.file.open,awk '{print \$1}' /proc/sys/fs/file-nr" >> /etc/zabbix/zabbix_agentd.confsystemctl restart zabbix-agent.service2) Solaris 10 예시 (단, Solaris 10에서 /proc/*/fd 조회하려면 root 권한으로 agent를 실행해야 하므로 위험이 따릅니다.)echo "UserParameter=custom.file.open,find /proc/*/fd -typ..

Monitoring 2024.11.25

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