Accepting a New Configuration

The security model implies that each monitoring agent must know its monitoring server address and use it for communication. In other words the agent, when queried, does not answer the requestor but initiates the connection to the known server and submits the requested data.

This approach requires the server URL (for the XML-RPC communication) to be stored locally on each agent. Although the server address is unlikely to change, we still need to handle the situations when it does change. One way of changing the configuration is to use some sort of configuration management system, such as Puppet, Chef, or CFEngine to maintain the configuration, but we are going to implement a mechanism whereby the client accepts a request to update its configuration. If you remember, in the previous chapter we created site and node configuration parameters on the server database. So now we're going to use those to update the client configuration.

When the client receives a command to update the configuration, it will initiate the connection back to the currently registered server and request a new URL. Once the new URL is retrieved, it will attempt to connect to the new server. If the connection fails, the configuration will not be updated; otherwise, the new data will overwrite the existing settings, and going forward the new URL will be used for the communication.

Was this article helpful?

0 0

Post a comment