From: Yves <yme...@pe...> - 2005-01-04 14:44:26
|
> Mail pour yves > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Yves, > > I can read the nagios.cfg file to obtain the location of nagios.pid. I > have a problem that none of the config variables tell me where this fil= e > is. I cannot assume that PP is installed into the Nagios directory > structure. You have to use a variable to write the file name. Ask yourself what filename is best : nagios config file or nagios pid fil= e ? :) > I think this was why this was written into the perfparse.cfg. No : perfparse used to use the pid of nagios. So it had to be specified i= nto perfparse.cfg. Now, perfparsed and perfparse-log2* don't use it, so it has nothing to do= with perfparse.cfg. > > The reason I didn't notice the demise of this method was that my > perfparse.cfg is old, I have not copied over the example for quite some > time. I thank the new user for finding this. If you want to support that script, I tell you again, update your perfpar= se.cfg and your perfparse.sh script at every new version of perfparse. > > Personally I would suggest just adding this option into perfparse.cfg > and an entry into config_file.c to match this so that every option is > accounted for. I would not do it. If that feature is broken in nagios (it used to be in = nagios-2.0), it would become a bug of perfparse too. If that feature changes or is remove= d, it would become a bug of perfparse. Don't depend on nagios too much : perfparse is= not a nagios extension but a project on its own :) Just put it in the script, and if that feature disappear, changes or is b= roken, users can easily change the script with no impact on perfparse binaries. This is also why I think that perfparse.sh should not be included in perf= parse. It is the role of the admins to provide that script, not the role of the develo= pers. And because it exists and because you want to maintain it, keep it. Some = users probably use it too. > > I will create the new scripts directory with the database creation > scripts as well as perfparse.sh. I'll edit the documentation where I > can find it. I hope I do not miss any! Also check perfparse.cfg.example. I suggest that you remove all options that are OK as default values (chec= k config_file.c) Only keep the options when perfparse cannot work if they are not edited (= like the directory where modules are, like the mysql login parameters...) Remove the others : users can do perfparsed --show_config to have all :) If you remove them, you will have less obsolete entries in the future whe= n you add/remove/change options of the config :) Yves --=20 - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - Perfparse - http://perfparse.sf.net/ - |