Get the App
SLTechnology News&Howtos  ›  Servers  › 

Ansible push script patrol inspection of Fujian Zhengtong

Shulou Source: shulou.com Published: 2022-06-03 06:34:22 10月03日 Update

If you need more machines for push, you'd better use the database, but if there are fewer machines, you can write dead variables. Create a new ordinary user on the patrol host, be exempted from installation by the patrol host, add a new ansible-hosts inspection host, and multiple tenants can be isolated by docker.

Extension can be reused with yml role code with the database is very convenient, now update the inspection script as long as update the script on ansible-server, add new functions.

There is no database record if the host needs to be inspected without installation. If yml uses the copy module, use sh to execute the script, but the script module will not find the execution path.

I have also written a set of scripts for monitoring alarms, and are still writing them.

#! / bin/bash#yejunhai # 2020-2-27 # concurrent connections send WeCom alarm periodic inspection notification # alarm threshold can be customized # define time cur_time () {date "+% Y-%m-%d% H:%M:%S"} wx () {# generate alarm script sent to WeCom sh_name=$0cat > $sh_name.json

Tags: Data database script host utilization disk enterprise machine module tenant port update monitoring push normal code memory function variable multiple Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft vpn Xiaomi Redmi Shulou Information