Open dtemes opened 9 years ago
Pve-monitor was not designed to monitor two clusters from the same configuration file. You must define another configuration file for your second cluster and configure nagios accordingly.
Thanks for your answer I have forked your repository and done some quick changes to fit my needs, basically adding a node parameter and using the given node to connect to the cluster, and also ignoring all object definitions but those that relate to that specified node. It does not make a lot of sense to bind resources to specific nodes in HA environments though.
My idea is to end up with more specific check commands so one can specify the checks to perform. The entries in the nagios cfg file would look like:
define service{ use generic-service host_name host1.example.com service_description OpenVZ VM1 check_command check_pve_cluster_openvz!ns3511571 vm1 80 90 80 90 80 90 }
where the args would be the node, the vm name and the warning and critical parameters for cpu, memory and disk. The main plugin config file would then contain only the node definitions with the needed credentials to connect to each one. It's just an idea.
Thanks for sharing your work!
I was trying to monitor two nodes not in the same cluster, but seems the main loop just connects to one node and then the rest of checks are done using that connection.