The agents are all developed using Python3.4.
The script requires the following arguments:
- IP address of Kubernetes Master.
- Scrape interval.
python3.4 kubernetes_api_exporter.py --master <MASTER-IP> -t <SCRAPE-INTERVAL>
The vault_exporter.py utilizes vault_utils.py. It needs to be placed locally onto the Vault server and run. The agent monitors the following:
- Vault Init check.
- Vault Seal check.
- Vault API check.
- Vault Hash check.
For the Vault API check, I have created a dummy entry using the below command.
vault write secret/prometheus password=prometheus username=prometheus
For the Vault Hash check, I am checking the md5sum for the vault folder and compairing it to the one generated everytime I scrape. The initial md5sum can be taken using the bash
command:
find /opt/vault/var/store/logical -type f -exec md5sum {} + | md5sum | awk '{print $1}'
The script requires the following arguments:
- Client certificate of vault server.
- Client decrypted key of vault server.
- Scrape interval.
- Current hash value.