Open Source 28

[ Zabbix ] Nginx Monitoring

Nginx를 웹 서비스로 선택하고, 모니터링을 해야하는데 Zabbix agent 템플릿이 있어 구축하였다. 주요 성능 지표는 아래 공식사이트를 참고하면 된다. Zabbix Agent는 이미 설치되었고, Nginx 설정만 포스팅 한다. https://www.zabbix.com/integrations/nginx Nginx monitoring and integration with Zabbix This template is for Zabbix version: 6.2 Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/nginx_agent?at=release/6.2 Nginx by Zabbix agent Overview For..

Open Source 2022.10.21

[ Prometheus ] Install jmx_exporter on Amazon Linux 2

- 운영체제 : Amazon Linux2 1. jmx_prometheus_javaagent-0.16.1.jar 다운로드 및 config (openJDK 1.8이고, 현재버전은 0.16.1) https://github.com/prometheus/jmx_exporter GitHub - prometheus/jmx_exporter: A process for exposing JMX Beans via HTTP for Prometheus consumption A process for exposing JMX Beans via HTTP for Prometheus consumption - GitHub - prometheus/jmx_exporter: A process for exposing JMX Beans via HTTP..

Open Source 2022.03.05

[ Prometheus ] Install node_exporter on Amazon Linux 2 (systemctl)

1. node_exporter 다운로드 ( 다운로드 ) wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz tar xvfz node_exporter-1.3.1.linux-amd64.tar.gz 2. Prometheus.yml 추가 - job_name: "node_exporter" static_configs: - targets: ["x.x.x.x:9100"] * 보안그룹이나 방화벽에서 9100포트 오픈 3. 서비스 기동 nohup ./node_exporter 1>/dev/null 2>&1 & Prometheus에서 Status > Targets 에서 상태를 ..

Open Source 2022.02.20

[ Prometheus ] Install Prometheus on Amazon Linux 2

1. 서비스 계정용도로 Prometheus 계정 생성 sudo useradd --no-create-home --shell /bin/false prometheus --no-create-home : 홈디렉토리를 생성하지 않는다. --shell SHELL : 로그인 셀 지정 2. configuration file과 libraries 디렉토리를 만들고, Prometheus 권한부여 sudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /var/lib/prometheus 3. Prometheus 다운로드 ( 다운로드 ) cd /tmp/ wget https://github.com/prometheus/prom..

Open Source 2022.02.19

[ Zabbix 5.0 ] Template DB MSSQL by ODBC Monitoring

- Zabbix Version : 5.0 LTS - 운영체제 : CentOS 7 Zabbix 5.0에서는 Template DB MSSQL by ODBC 템플릿이 기본적으로 내장되어 있다. ODBC는 Zabbix 서버에서 ODBC로 DB 인증을 받기 때문에, Agent에서는 별도의 작업은 없다. ODBC를 연결하는 방법에는 freeTDS와 MSSQL 드라이버를 이용하는 방법이 있는데, 이번 포스팅에서는 MSSQL 드라이브를 이용하여 ODBC를 이용하겠다. Step 1 https://docs.microsoft.com/ko-kr/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15 M..

Open Source 2021.04.05

[ Zabbix ] Zabbix server is not running : the infomation displayed may not be current Problem

[ Problem ] Zabbix server is not running : the infomation displayed may not be current Zabbix를 구축하고, 50대 정도 노드를 늘리니 웹 브라우저에 아래와 같이 메세지가 발생하였다. zabbix 로그를 보니, out of memory 발생하였고, Zabbix Health도 Zabbix configuration이 Full 사용이었다. 4026:20200615:141000.390 [file:dbconfig.c,line:94] __zbx_mem_realloc(): out of memory (requested 16 bytes) 4039:20200615:141010.892 [file:dbconfig.c,line:94] __zbx_mem_re..

Open Source 2020.06.15

[ Zabbix ] Zabbix Problem monitoring using Python API. (파이썬 API를 이용한 Zabbix Problem 모니터링)

1. Create Sample Trigger (트리거 생성) 2. Python API (ZabbixAPI_py) # API # pip install ZabbixAPI_py from ZabbixAPI_py import Zabbix from datetime import datetime from datetime import timedelta # Zabbix Auth zabbix = Zabbix('host') zabbix.login('id','password') # before 10 Min tenMin = datetime.today() - timedelta(minutes=10) # get problems for x in zabbix.problem(method='get'): eventTime = datetime...

Open Source 2020.06.02