티스토리 뷰
17년 5월 기준.
rpm -Uvh https://yum.opennms.org/repofiles/opennms-repo-stable-rhel6.noarch.rpm
yum -y install opennms
wget http://yum.opennms.org/repofiles/OPENNMS-GPG-KEY
rpm --import ./OPENNMS-GPG-KEY
// Invalid GPG key 관련 에러시 key import
su - postgres
createuser -P opennms
createdb -O opennms opennms
vi /var/lib/pgsql/data/pg_hba.conf
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
vi /opt/opennms/etc/opennms-datasources.xml
<jdbc-data-source name="opennms"
database-name="opennms"
class-name="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/opennms"
user-name="opennms"
password="opennms" />
<jdbc-data-source name="opennms-admin"
database-name="template1"
class-name="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/template1"
user-name="postgres"
password="postgres" />
/opt/opennms/bin/runjava -s
/opt/opennms/bin/install -dis
service opennms start
http://192.168.100.75:8980/opennms
admin/admin
SNMP Node Data 확인
Reports-Resource-Graphs-Custom
tail -f /opt/opennms/logs/output.log
// log 확인
SNMP port 161
SNMP trap port 162
[root@RPSPLUSDEV02 opennms]# netstat -anp | grep 162
udp 0 0 :::162 :::* 5110/java
// trap port를 opennms가 사용.
/opt/opennms/etc/eventconf.xml
// SNMP trap event definitions
snmptrap -v 2c -c public 192.168.100.239 0 .1.3.6.1.4.1.19184.23.1.200.0.2001 .1.3.6.1.4.1.19184.23.1.200.0.2001.1 s "test2"
// snmptrap test
snmptrap -v 2c -c public 192.168.100.239 0 1.3.6.1.4.1.43555 1.3.6.1.2.1.1.5 s "<IMG SRC=/ onerror=\"alert('SNMP Trap Test')\"></IMG>"
// 데이터에 html 삽입 가능. o가 replace되어서 출력. 보안상 막은듯.
snmp 2c는 주소뒤에 Uptime 0 또는 ''넣어야 한다.
'Study' 카테고리의 다른 글
Zabbix(자빅스) 관련 (0) | 2024.01.10 |
---|---|
Splunk(스플렁크) 관련 (0) | 2024.01.10 |
HAProxy(에이치에이프록시) SSL 관련 (1) | 2024.01.07 |
Java(자바) send mail(메일 보내기) (0) | 2024.01.07 |
Tomcat(톰캣) mod_jk 설정 관련 (0) | 2024.01.07 |