Community pioneers
Wanted to contribute with ideas?, want to expand the use of pandora or to help us improving it?. This... View more
Suggestion for a Agent config include directory
-
Suggestion for a Agent config include directory
I’ve been setting up Pandora FMS to monitor a Asterisk server (Elastix) and I have a pile of module settings to include into the pandora_agent.conf but what I find is that it is really messy editing this single configuration file.
I must say that it is trivial to get the Pandora FMS agent to collect the data and get some great looking graphs on the console – Pandora FMS is awesome software people ! (I remember working with HP Openview back in early 1990’s on Suns)
What would be nice is how Apache does this; you have a very stable distribution configuration file that rarely changes and then you include a directory e.g. for Apache the httpd.conf has something like,
Include conf.d/*.conf
which causes the agent to load up any number of other configuration files one by one.
This would tidy up the configuration settings dramatically and make it easier for other people to copy what you have done as they just drop in different configuration files according to the type of system and applications into that configuration file folder.
More importantly a re-install of Pandora FMS agent won’t delete your specific config file settings as they won’t be in the pandora_agent.conf file.
For example I could have all my asterisk module definitions in one file called e.g. pfms-asterisk-1.6-application-monitoring.conf and have my hardware definitions (hddtemp, sensors) in another file e.g. pfms-hardware-compaq-evo.conf
If I upgrade Asterisk and the command line changes then I could create a different e.g. pfms-asterisk-1.8-application-monitoring.conf file and then delete the old pfms-asterisk-1.6-application-monitoring.conf so it doesn’t get picked up.
Same with the hardware monitoring. Sensor chipsets have a wide variety of results with the sensors output having different strings. Once I have settled on which value gets me a usable “CPUTemp” then I should be able to put my motherboard specific changes into a usefully named config file e.g. pfms-hardware-ibm-built1.conf or pfms-hardware-dell-v2.conf that is unique for that motherboard/chipset or my custom build.
Same with theMySQL monitoring. If they could be dropped into say a file called pfms-mysql-5.conf
So when I make a Asterisk server then I can copy across a set of .conf files e.g. a .conf for the Asterisk version, a .conf for the Mysql and a .conf for the specific hardware I’ve built the system on and any number of other .conf files according to what other features the server has been built with.
Even if I use plugins e.g. my own or Nagios with the wrapper or create my own fancy module_exec settings then I can easily advertise these .conf file settings to others.
In time we could also package up plugins and their configuration files and this makes it trivial to add to a server because the package maintainer just sets up their script to copy any plugins to the plugins directory and the relevant .conf file into the pandora/conf.d directory and then re-hups the agent daemon.
The daemon reads the pandora_agent.conf and the ./conf.d/*.conf files and then runs with those as if they were all in one big .conf file.
Thoughts ? – this is kind of trivial to implement as its just telling the perl script to pipe in the contents of all the files that match a particular file spec rather than just reading the one pandora_agent.conf file.