https://mp.weixin.qq.com/s/DQND4hmyYJrl54lqcTMEJA 你所見過最詳細的Zabbix使用教程【收藏版】php
Centos7.3安裝部署最新版Zabbix3.4 html
https://blog.csdn.net/xiegh2014/article/details/77571965
zabbix 3.4 郵件報警配置python
zabbix 3.4 配置文件說明mysql
[root@zabbix ~]# zabbix_server -V
zabbix_server (Zabbix) 3.4.7
Revision 77720 16 February 2018, compilation time: Feb 19 2018 07:28:20linux
[root@zabbix ~]# zabbix_get -V
zabbix_get (Zabbix) 3.4.7
Revision 77720 16 February 2018, compilation time: Feb 19 2018 07:28:40nginx
zabbix 3.4 git
zabbix_server.conf說明github
yum install zabbix-get
服務端安裝zabbix-get檢測工具
zabbix_get :command not found 解決辦法
yum list all |grep zabbix 會列出zabbix 客戶端信息
yum install zabbix-get.x86_64web
zabbix_agentd.conf說明redis
[root@dns988 zabbix]# vim /etc/zabbix/zabbix_agentd.conf
Server=172.17.0.150 填寫Server的IP地址
ServerActive=172.17.0.150 修改成Server的IP地址
Hostname=172.17.0.150 通常寫IP
Hostname=h3.worker.com 或者本機的主機名稱uname -rn 名稱在服務器端用可以解析
UnsafeUserParameters=1 #是否容許自定義的key,1爲容許,0爲不容許
Include=/etc/zabbix/zabbix_agentd.d/*.conf 配置文件打開此功能,這樣能夠將腳本放在這個目錄下,各類.conf 配置一目瞭然。
備註:若是但願使用root用戶啓動,則修改 zabbix_agentd.conf中 AllowRoot=1
[root@dns988 zabbix]# systemctl stop zabbix-agent.service
[root@dns988 zabbix]# ss -tnlp |grep 10050
[root@dns988 zabbix]# systemctl start zabbix-agent.service
[root@dns988 zabbix]# ss -tnlp |grep 10050
Zabbix監控nginx性能(113)監控Nginx的7種鏈接 狀態ngx_status
http://www.ttlsa.com/zabbix/zabbix-monitor-nginx-performance/
前提是打開NGINX 的status 模塊的功能
location /ngx_status {
allow 0.0.0.0;
stub_status on;
}
[root@localhost zabbix_agentd.d]# pwd
/etc/zabbix/zabbix_agentd.d
[root@localhost zabbix_agentd.d]# vim nginx_status.conf
UserParameter=nginx.status[*],/etc/zabbix/zabbix_agentd.d/nginx_status.sh $1
[root@localhost zabbix_agentd.d]# vim nginx_status.sh
#!/bin/bash
HOST="127.0.0.1"
PORT="80"
function ping {
/sbin/pidof nginx | wc -l
}
function active {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| grep 'Active' | awk '{print $NF}'
}
function reading {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| grep 'Reading' | awk '{print $2}'
}
function writing {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| grep 'Writing' | awk '{print $4}'
}
function waiting {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| grep 'Waiting' | awk '{print $6}'
}
function accepts {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| awk NR==3 | awk '{print $1}'
}
function handled {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| awk NR==3 | awk '{print $2}'
}
function requests {
/usr/bin/curl "http://$HOST:$PORT/ngx_status/" 2>/dev/null| awk NR==3 | awk '{print $3}'
}
$1
Zabbix結合OneAlert實現免費電話報警以及微信、短信、郵件報警
http://www.21yunwei.com/archives/5134
Zabbix 3.4配置釘釘機器人報警圖文教程
zabbix 監控TCP的鏈接狀態,採用腳本的方式 ----自定義監控與監控報警
ZABBIX 3.2 監控服務器TCP鏈接狀態(https://www.abcdocker.com/abcdocker/2652)
使用zabbix監控tcp鏈接數
https://blog.csdn.net/messiaDemo/article/details/52183692
腳本以下:
[root@zabbix zabbix_agentd.d]# vim tcp_status.sh
#!/bin/bash
#this script is used to get tcp and udp connetion status
#tcp status
metric=$1
tmp_file=/tmp/tcp_status.txt
/bin/netstat -an|awk '/^tcp/{++S[$NF]}END{for(a in S) print a,S[a]}' > $tmp_file
case $metric in
closed)
output=$(awk '/CLOSED/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
listen)
output=$(awk '/LISTEN/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
synrecv)
output=$(awk '/SYN_RECV/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
synsent)
output=$(awk '/SYN_SENT/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
established)
output=$(awk '/ESTABLISHED/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
timewait)
output=$(awk '/TIME_WAIT/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
closing)
output=$(awk '/CLOSING/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
closewait)
output=$(awk '/CLOSE_WAIT/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
lastack)
output=$(awk '/LAST_ACK/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
finwait1)
output=$(awk '/FIN_WAIT1/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
finwait2)
output=$(awk '/FIN_WAIT2/{print $2}' $tmp_file)
if [ "$output" == "" ];then
echo 0
else
echo $output
fi
;;
*)
echo -e "\e[033mUsage: sh $0 [closed|closing|closewait|synrecv|synsent|finwait1|finwait2|listen|established|lastack|timewait]\e[0m"
esac
[root@zabbix zabbix_agentd.d]# ls 自定義用戶參數
status.conf tcp_status.sh userparameter_mysql.conf
[root@zabbix zabbix_agentd.d]# vim status.conf
UserParameter=tcp.status[*],/etc/zabbix/zabbix_agentd.d/tcp_status.sh "$1"
zabbix監控redis--採用腳本的方式
zabbix3.x監控reddis模板
http://www.javashuo.com/article/p-kgchusgw-cz.html
[root@template zabbix]# vim redis.sh
#!/bin/bash
REDISPATH="/usr/local/redis/bin/redis-cli"
HOST="172.17.9.29"
PORT="6379"
REDIS_PA="$REDISPATH -h $HOST -p $PORT info"
if [[ $# == 1 ]];then
case $1 in
cluster)
result=$REDIS_PA|/bin/grep cluster|awk -F":" '{print $NF}'
echo $result
;;
uptime_in_seconds)
result=$REDIS_PA|/bin/grep uptime_in_seconds|awk -F":" '{print $NF}'
echo $result
;;
connected_clients)
result=$REDIS_PA|/bin/grep connected_clients|awk -F":" '{print $NF}'
echo $result
;;
client_longest_output_list)
result=$REDIS_PA|/bin/grep client_longest_output_list|awk -F":" '{print $NF}'
echo $result
;;
client_biggest_input_buf)
result=$REDIS_PA|/bin/grep client_biggest_input_buf|awk -F":" '{print $NF}'
echo $result
;;
blocked_clients)
result=$REDIS_PA|/bin/grep blocked_clients|awk -F":" '{print $NF}'
echo $result
;;
#內存
used_memory)
result=$REDIS_PA|/bin/grep used_memory|awk -F":" '{print $NF}'|awk 'NR==1'
echo $result
;;
used_memory_human)
result=$REDIS_PA|/bin/grep used_memory_human|awk -F":" '{print $NF}'|awk -F'K' '{print $1}'
echo $result
;;
used_memory_rss)
result=$REDIS_PA|/bin/grep used_memory_rss|awk -F":" '{print $NF}'
echo $result
;;
used_memory_peak)
result=$REDIS_PA|/bin/grep used_memory_peak|awk -F":" '{print $NF}'|awk 'NR==1'
echo $result
;;
used_memory_peak_human)
result=$REDIS_PA|/bin/grep used_memory_peak_human|awk -F":" '{print $NF}'|awk -F'K' '{print $1}'
echo $result
;;
used_memory_lua)
result=$REDIS_PA|/bin/grep used_memory_lua|awk -F":" '{print $NF}'
echo $result
;;
mem_fragmentation_ratio)
result=$REDIS_PA|/bin/grep mem_fragmentation_ratio|awk -F":" '{print $NF}'
echo $result
;;
#rdb
rdb_changes_since_last_save)
result=$REDIS_PA|/bin/grep rdb_changes_since_last_save|awk -F":" '{print $NF}'
echo $result
;;
rdb_bgsave_in_progress)
result=$REDIS_PA|/bin/grep rdb_bgsave_in_progress|awk -F":" '{print $NF}'
echo $result
;;
rdb_last_save_time)
result=$REDIS_PA|/bin/grep rdb_last_save_time|awk -F":" '{print $NF}'
echo $result
;;
rdb_last_bgsave_status)
result=$REDIS_PA|/bin/grep -w "rdb_last_bgsave_status" | awk -F':' '{print $2}' | /bin/grep -c ok
echo $result
;;
rdb_current_bgsave_time_sec)
result=$REDIS_PA|/bin/grep -w "rdb_current_bgsave_time_sec" | awk -F':' '{print $2}'
echo $result
;;
#rdbinfo
aof_enabled)
result=$REDIS_PA|/bin/grep -w "aof_enabled" | awk -F':' '{print $2}'
echo $result
;;
aof_rewrite_scheduled)
result=$REDIS_PA|/bin/grep -w "aof_rewrite_scheduled" | awk -F':' '{print $2}'
echo $result
;;
aof_last_rewrite_time_sec)
result=$REDIS_PA|/bin/grep -w "aof_last_rewrite_time_sec" | awk -F':' '{print $2}'
echo $result
;;
aof_current_rewrite_time_sec)
result=$REDIS_PA|/bin/grep -w "aof_current_rewrite_time_sec" | awk -F':' '{print $2}'
echo $result
;;
aof_last_bgrewrite_status)
result=$REDIS_PA|/bin/grep -w "aof_last_bgrewrite_status" | awk -F':' '{print $2}' | /bin/grep -c ok
echo $result
;;
#aofinfo
aof_current_size)
result=$REDIS_PA|/bin/grep -w "aof_current_size" | awk -F':' '{print $2}'
echo $result
;;
aof_base_size)
result=$REDIS_PA|/bin/grep -w "aof_base_size" | awk -F':' '{print $2}'
echo $result
;;
aof_pending_rewrite)
result=$REDIS_PA|/bin/grep -w "aof_pending_rewrite" | awk -F':' '{print $2}'
echo $result
;;
aof_buffer_length)
result=$REDIS_PA|/bin/grep -w "aof_buffer_length" | awk -F':' '{print $2}'
echo $result
;;
aof_rewrite_buffer_length)
result=$REDIS_PA|/bin/grep -w "aof_rewrite_buffer_length" | awk -F':' '{print $2}'
echo $result
;;
aof_pending_bio_fsync)
result=$REDIS_PA|/bin/grep -w "aof_pending_bio_fsync" | awk -F':' '{print $2}'
echo $result
;;
aof_delayed_fsync)
result=$REDIS_PA|/bin/grep -w "aof_delayed_fsync" | awk -F':' '{print $2}'
echo $result
;;
#stats
total_connections_received)
result=$REDIS_PA|/bin/grep -w "total_connections_received" | awk -F':' '{print $2}'
echo $result
;;
total_commands_processed)
result=$REDIS_PA|/bin/grep -w "total_commands_processed" | awk -F':' '{print $2}'
echo $result
;;
instantaneous_ops_per_sec)
result=$REDIS_PA|/bin/grep -w "instantaneous_ops_per_sec" | awk -F':' '{print $2}'
echo $result
;;
rejected_connections)
result=$REDIS_PA|/bin/grep -w "rejected_connections" | awk -F':' '{print $2}'
echo $result
;;
expired_keys)
result=$REDIS_PA|/bin/grep -w "expired_keys" | awk -F':' '{print $2}'
echo $result
;;
evicted_keys)
result=$REDIS_PA|/bin/grep -w "evicted_keys" | awk -F':' '{print $2}'
echo $result
;;
keyspace_hits)
result=$REDIS_PA|/bin/grep -w "keyspace_hits" | awk -F':' '{print $2}'
echo $result
;;
keyspace_misses)
result=$REDIS_PA|/bin/grep -w "keyspace_misses" | awk -F':' '{print $2}'
echo $result
;;
pubsub_channels)
result=$REDIS_PA|/bin/grep -w "pubsub_channels" | awk -F':' '{print $2}'
echo $result
;;
pubsub_channels)
result=$REDIS_PA|/bin/grep -w "pubsub_channels" | awk -F':' '{print $2}'
echo $result
;;
pubsub_patterns)
result=$REDIS_PA|/bin/grep -w "pubsub_patterns" | awk -F':' '{print $2}'
echo $result
;;
master_link_status)
result=$REDIS_PA|/bin/grep -w "master_link_status"|awk -F':' '{print $2}'|/bin/grep -c up
echo $result
;;
master_last_io_seconds_ago)
result=$REDIS_PA|/bin/grep -w "master_last_io_seconds_ago"|awk -F':' '{print $2}'
echo $result
;;
master_sync_in_progress)
result=$REDIS_PA|/bin/grep -w "master_sync_in_progress"|awk -F':' '{print $2}'
echo $result
;;
slave_priority)
result=$REDIS_PA|/bin/grep -w "slave_priority"|awk -F':' '{print $2}'
echo $result
;;
#cpu
used_cpu_sys)
result=$REDIS_PA|/bin/grep -w "used_cpu_sys"|awk -F':' '{print $2}'
echo $result
;;
used_cpu_user)
result=$REDIS_PA|/bin/grep -w "used_cpu_user"|awk -F':' '{print $2}'
echo $result
;;
used_cpu_sys_children)
result=$REDIS_PA|/bin/grep -w "used_cpu_sys_children"|awk -F':' '{print $2}'
echo $result
;;
used_cpu_user_children)
result=$REDIS_PA|/bin/grep -w "used_cpu_user_children"|awk -F':' '{print $2}'
echo $result
;;
)
echo "Usage:$0{uptime_in_seconds|connected_clients|client_longest_output_list|client_biggest_input_buf|blocked_clients|used_memory|used_m
emory_human|used_memory_rss|used_memory_peak|used_memory_peak_human|used_memory_lua|mem_fragmentation_ratio|rdb_changes_since_last_save|rdb_bgsav
e_in_progress|rdb_last_save_time|rdb_last_bgsave_status|rdb_current_bgsave_time_sec|aof_enabled|aof_rewrite_scheduled|aof_last_rewrite_time_sec|a
of_current_rewrite_time_sec|aof_last_bgrewrite_status|aof_current_size|aof_base_size|aof_pending_rewrite|aof_buffer_length|aof_rewrite_buffer_len
gth|aof_pending_bio_fsync|aof_delayed_fsync|rejected_connections|instantaneous_ops_per_sec|total_connections_received|total_commands_processed|ex
pired_keys|evicted_keys|keyspace_hits|keyspace_misses|pubsub_channels|pubsub_patterns|latest_fork_usec|connected_slaves|master_link_status|master
_sync_in_progress|master_last_io_seconds_ago|connected_slaves|slave_priority|used_cpu_user|used_cpu_sys|used_cpu_sys_children|used_cpu_user_child
ren}"
;;
esac
#db0:key
elif [[ $# == 2 ]];then
case $2 in
keys)
result=$REDIS_PA| /bin/grep -w "db0"| /bin/grep -w "$1" | /bin/grep -w "keys" | awk -F'=|,' '{print $2}'
echo $result
;;
expires)
result=$REDIS_PA| /bin/grep -w "db0"| /bin/grep -w "$1" | /bin/grep -w "expires" | awk -F'=|,' '{print $4}'
echo $result
;;
avg_ttl)
result=$REDIS_PA|/bin/grep -w "db0"| /bin/grep -w "$1" | /bin/grep -w "avg_ttl" | awk -F'=|,' '{print $6}'
echo $result
;;
)
echo "Usage:$0{db0 keys|db0 expires|db0 avg_ttl}"
;;
esac
fi
zabbix zatree 插件的安裝
zabbix Graphtree 插件的使用
zabbix3.4安裝graphtrees補丁 https://blog.csdn.net/mofiu/article/details/79724108
zabbix Grafana 單獨使用,來展現高逼格的圖像和使用,這裏的版本比較舊了,能夠Grafana 如今都5.0 版本了
http://www.javashuo.com/article/p-bvsatywy-ba.html
zabbix 結合grafana設計本身的監控系統
http://www.javashuo.com/article/p-oougajuw-bb.html
Zabbix 結合 Grafana 實現酷炫監控
http://www.sohu.com/a/145376291_151779
zabbix 結合Docker的使用和安裝
zabbix自動發現,自動註冊
zabbix 監控web 服務器
https://www.zabbix.com/documentation/3.4/zh/manual/web_monitoring
zabbix 監控URL地址 web場景
zabbix 應用服務監控
zabbix 的分佈式監控和SNMP的使用 proxy多機房監控
zabbix 結合第三方報警平臺www.onealert.com
zabbix的基本概念不作介紹
關於zabbix的模板說明
網上有製做好的模板https://github.com/zhangyao8/zabbix-community-repos 巧用模板來配置zabbix
zabbix 基於JMX監控tomcat
https://blog.csdn.net/a445588996/article/details/72240444
使用zabbix3.0.4的ICMP Ping模版實現對客戶端網絡狀態的監控
https://blog.csdn.net/reblue520/article/details/76286911
zabbix監控php-fpm的性能
http://www.cnblogs.com/pythonal/p/7744437.html
zabbix入門到精通之初識用戶參數User parameters
https://blog.51cto.com/nanwangting/category15.html
zabbix監控IDC機房丟包率的shell腳本
https://blog.csdn.net/m0_37886429/article/details/68060656
Zabbix監控Dell服務器硬件狀態
https://blog.csdn.net/wh211212/article/details/70014141 OMSA介紹
https://blog.csdn.net/dai451954706/article/details/18558057
zabbix 監控服務器時間是否正確
zabbix 服務監控
https://www.zabbix.com/documentation/3.4/zh/manual/it_services
zabbix3.4監控華爲防火牆USG6600
https://blog.csdn.net/qq_39788858/article/details/78614353
Zabbix監控交換機設置
http://www.osyunwei.com/archives/8063.html
zabbix 硬件監控 系統監控 Java 監控 網絡設備監控 SNMP
zabbix實戰--Memcached,redis監控詳解
https://blog.csdn.net/whs_321/article/details/54021333
【轉載:九一樂維】zabbix 3.4新功能值——告警併發
http://www.javashuo.com/article/p-vmwiosid-bs.html
Zabbix 3.0 添加監控 esxi 主機
http://www.bubuko.com/infodetail-1738157.html
https://blog.51cto.com/nanwangting/category15.html
關於vcenter log的日誌存儲:
cat /var/log/zabbix/zabbix_server.log
http://www.cnblogs.com/pythonal/p/6835098.html
Zabbix遠程執行命令
http://www.javashuo.com/article/p-mgsrezdl-cs.html
一、修改agent的配置文件
vim /application/zabbix/etc/zabbix_agentd.conf
EnableRemoteCommands=1
、
二、修改zabbix用戶的執行權限
zabbix ALL=NOPASSWD:ALL
zabbix ALL=NOPASSWD:/etc/init.d/httpd start
並註釋掉此行
三、在Web管理界面操做
在Web管理界面操做
一、在發送報警的動做中添加新的操做類型<遠程命令>
二、選擇目標列表爲須要操做的主機
三、類型爲自定義腳本
sudo /etc/init.d/httpd start
四、重啓客戶端
解決zabbix的中文亂碼的問題
http://www.javashuo.com/article/p-fhppeosd-ck.html
對於DELL服務器,咱們能夠經過專用的Omsa來監控服務器的硬件信息
https://blog.csdn.net/wh211212/article/details/70014141
https://www.jianshu.com/p/ecbd5e21924b (這個更好還有模板)
Zabbix 監控 Esxi
https://www.linuxidc.com/Linux/2017-07/145943.htm
Zabbix 3.4.3實現企業微信報警
https://www.linuxidc.com/Linux/2017-11/148418.htm
基於Zabbix IPMI監控服務器硬件情況
http://www.javashuo.com/article/p-hlfixxoz-bh.html
zabbix3.2監控MYSQL狀態
zabbix 監控各類服務
好比DNS,dhcp ,web 服務
關於zabbix的各類模板
15 / 15
zabbix 3.2.2 agent端(源碼包)安裝部署 (二)
https://www.cnblogs.com/miclesvic/p/6144924.html
若是不能正常啓動,注意查看日誌,有沒有報錯信息,這個很是關鍵是拍錯首選之路,今天是在centos 6.8 上源碼編譯安裝zabbix-3.4.7 ,錯誤的日誌信息是
25611:20180403:105340.620 Zabbix Agent stopped. Zabbix 3.4.7 (revision 77720).
zabbix_agentd [10490]: cannot open PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied
zabbix_agentd [10525]: cannot open PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied
zabbix_agentd [14514]: cannot open PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied
一看這個就知道緣由了。
http://www.cactifans.org/ zabbix 社區 當代張思德
Zabbix監控docker
https://blog.csdn.net/xundh/article/details/71449577
運維基礎——Zabbix 添加web頁面url狀態監控
https://blog.csdn.net/wn_hello/article/details/52121888
https://www.cnblogs.com/wjoyxt/p/7093372.html
http://www.mamicode.com/info-detail-1446472.html 這個圖的展現更爲友好
http://www.javashuo.com/article/p-zjovbsbi-dn.htmlZabbix實現自動發現端口並監控遇到的問題:,使用visudo 打開便可。sudo:抱歉,您必須擁有一個終端來執行 sudo 解決辦法編輯 /etc/sudoers 文件,將Default requiretty註釋掉。sudo vim /etc/sudoers#Default requiretty#註釋掉 Default requiretty 一行關於zabbix的宏介紹