您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
#!/bin/bash exec <22.txt while read line do ############################# echo 'define host {' >>ping.host echo ' use linux-server' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " alias `echo $line|awk '{print $1}'` " >>ping.host echo " address `echo $line|awk '{print $2}'` " >>ping.host echo ' register 1' >>ping.host echo ' contact_groups MISAdmin' >>ping.host echo "}" >>ping.host ########################################## #P I N G echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux_PING " >>ping.host echo " check_command check_ping!100.0,20%!500.0,60% " >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ########################### #C P U ###################################### ######################################### #Memory #$ echo 'define service {' >>ping.host # echo ' use generic-service' >>ping.host # echo " host_name `echo $line|awk '{print $1}'`" >>ping.host # echo " service_description ESXi Memory Usage" >>ping.host # echo ' check_command check_nrpe_memory' >>ping.host # echo 'register1' >>ping.host # echo 'contact_groupsMISAdmin' >>ping.host # echo "}" >>ping.host ########################################## #Network echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux_http" >>ping.host echo ' check_command check_http' >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ######################################### echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux_ssh" >>ping.host echo ' check_command check_ssh' >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ########################################### #io_read echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux_swap" >>ping.host echo ' check_command check_local_swap!20!10' >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ########################################### echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux-disk" >>ping.host echo ' check_command check_local_disk!20%!10%!/' >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ########################################### echo 'define service {' >>ping.host echo ' use generic-service' >>ping.host echo " host_name `echo $line|awk '{print $1}'`" >>ping.host echo " service_description linux_users" >>ping.host echo ' check_command check_local_users!20!50' >>ping.host echo 'register1' >>ping.host echo 'contact_groupsMISAdmin' >>ping.host echo "}" >>ping.host ############################################### done
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。