Cluster Monitor Agent is an internal tool that monitors the cluster resources. It helps the infrastructure team to keep track of the hardware specifications and resource usages of a Linux cluster. It also helps to persist the data in an RDBMS databse
Architecture:
Tables:
host_info
stores the hardware specification information whereas host_usage
stores the resource usages information. There are two scripts written namely, host_info.sh
which collects the host hardware information and then inserts these information to the table host_info in the database. This script is execute once. host_usage.sh
collects the current host usage and then insert the data into host_usage table. Crontab is used to trigger this script every minute. init.sql
creates a database and two tables
-
psql -h localhost -U postgres -W host_agent -f init.sql
to execute init.sql -
host_info.sh usage:
bash host_info.sh psql_host psql_port db_name psql_user psql_password
-
host_usage.sh usage:
bash host_usage.sh psql_host psql_port db_name psql_user psql_password
-
crontab setup:
* * * * * /home/centos/dev/jrvs/bootcamp/host_agent/scripts/host_usage.sh localhost 5432 host_agent postgres password > /tmp/host_usage.log
- handle hardware update
- improve sql search
- normalized sql tables