Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix Monitoring ipv6

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Zabbix simply monitors the connectivity of ipv6 addresses. Refer to the Template ICMP Ping template

0. Preparation 0-1. The server already has an ipv6 address. Ipv6 involves configuration files (some can be ignored): / usr/share/oem/grub.cfg / etc/modprobe* / etc/sysconfig/network / etc/sysctl.conf / etc/sysctl.conf.first / etc/ssh/sshd_config / etc/sysconfig/network-scripts/ifcfg-$ifcfg / etc/sysconfig/network-scripts/route6-$ifcfg # ip-6 route add default dev "$ifcfg" modprobe ipv6 & & lsmod | grep ipv6 ip6tables. 0-2, Compile on zabbix server (it is recommended to add without ipv6):. / configure-- prefix=/usr/local/zabbix/-- enable-server-- enable-agent-- with-mysql-- with-net-snmp-- with-libcurl-- with-libxml2-- enable-ipv6 make Make install # recompile installation will not overwrite the old configuration files such as 1, zabbix_server.conf1-0, because fping and fping6 are different, but zabbix itself will not support both enabled at the same time and can recognize ipv6 addresses, you need to download the latest fping package compilation installation (or custom shell scripts to filter ipv4 addresses to make them compatible, but relatively cumbersome. Discarded! ) wget http://www.fping.org/dist/fping-4.2.tar.gz tar xf fping-4.2.tar.gz & & cd fping-4.2. / configure & & make & & make install chmod uplix / usr/local/sbin/fping cp-ra / usr/sbin/fping {, .bak} & & cp-ra / usr/sbin/fping6 { .bak} cp-ra / usr/local/sbin/fping / usr/sbin/fping # can first test to see if the new fping is compatible with ipv4 and ipv61-1, and uncomment Fping6Location= And leave the value 1-2, restart zabbix_server1-3, ps aux | grep fping # check if there is no fping6. Otherwise, if both fping and fping6 commands exist before and fping does not support ipv6, the page will display [Cannot send ICMP ping packets to this host.] 2, zabbix_agentd.conf2-1, custom discovery key: UserParameter=discovery.ipv6 Sh / usr/local/zabbix/scripts/discovery_ipv6.sh discovery_ipv62-2, Authorization: chown zabbix:zabbix / usr/local/zabbix/scripts/discovery_ipv6.sh chmod + x / usr/local/zabbix/scripts/discovery_ipv6.sh2-3, restart zabbix_agentd3, zabbix Page configuration 3-1, create template:

3-2. Create auto-discovery rules:

3-3. Create a monitoring prototype:

3-4. Create a trigger prototype:

3-5. Link the associated Template IPv6 Address template to the monitoring original template (parent template) 4, other 4-1, ipv6 addresses can be found automatically or obtained 4-2 according to the resource record api, other monitoring such as ip6tables join / etc/sudoers user permission and then custom firewall monitoring

Attachment:

# cat / usr/local/zabbix/scripts/discovery_ipv6.sh #! / bin/bash# ipv6 address discovery function discovery_ipv6 () {ipv6= ($(ip a | grep 'scope global' | grep-oP') (?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report