获取mysql中数据进行zabbix监控
es_get_task_count.sh
#!/bin/bash
task_count=`mysql -h 172.17.100.216 -P13306 -uureadonly -p"Etr4(865r^ereh874t" -N<<EOF
use cmdb;
select task_count from tb_es_task_stats where ipaddr='172.17.10.20' order by create_time desc limit 1;
EOF`
echo $task_count
浙公网安备 33010602011771号