Warn if clientlaunch.d file name requirements are not met

Bug #401393 reported by Arie Skliarouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xymon (Ubuntu)
Undecided
Axel Beckert

Bug Description

Declaration on new check that I put into /etc/hobbit/clientlaunch.d directory are disregarded by the hobbitlaunch daemon. If I put the configuration into the /etc/hobbit/clientlaunch.cfg file, the hobbitlaunch starts launching the custom script.

Either fix the hobbitlaunch to actually look into the /etc/hobbit/clientlaunch.d directory or delete it altogether.

Related branches

Revision history for this message
Christoph Berg (myon) wrote :

Did you restart the daemon? It doesn't reliably load new files on reload.

Revision history for this message
Arie Skliarouk (skliarie) wrote :

Yes, I did restart the daemon:
/etc/init.d/hobbit-client start
/etc/init.d/hobbit-client stop

Here is the content of the file I have put into /etc/hobbit/clientlaunch.d directory.
[raid]
    #DISABLED
    ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
    CMD $HOBBITCLIENTHOME/ext/bb-raid.pl
    LOGFILE $HOBBITCLIENTHOME/logs/hobbitclient.log
    INTERVAL 10m

Revision history for this message
Christoph Berg (myon) wrote :

Did you include a ".cfg" extension in the filename in the clientlauch.d directory? It needs to have one, because the Debian version needs a filter one filenames so that it doesn't read .dpkg-old and friends.

Revision history for this message
Arie Skliarouk (skliarie) wrote :

That was the problem. Once I renamed the file to have .cfg extension it was automatically picked up.

Can you make hobbit-client to print warning into log files on start in case it finds filenames in directory etc/hobbit/clientlaunch.d that do not have .cfg extension? This might have save time for someone like me in the future.

Axel Beckert (xtaran)
summary: - declarations in clientlaunch.d directory are disregarded
+ Warn if clientlaunch.d file name requirements are not met
Revision history for this message
Christoph Berg (myon) wrote :

We cannot warn on random files there because there will always be files named foo~, foo.backup.1, foo.dpkg-old, foo.cfsaved, and whatever stuff editors and config management software comes up with.

It might be possible to warn on files that do not have any dots in the name, though. (or maybe do not match *.cfg*)

Revision history for this message
Arie Skliarouk (skliarie) wrote :

Why not? If that can save time for someone, I don't mind having couple of warning messages in syslog for each hobbit start.

Better alternative would be to write xymon_conf_check program that will check configuration files for correctness and show list of files it used (or for some reason - did not).

Xymon, by its CLI nature, is already hard to configure. Please don't make it harder than it already is.

Revision history for this message
Axel Beckert (xtaran) wrote :

> Xymon, by its CLI nature, is already hard to configure. Please don't make it harder than it already is.

Huh? On of the things I like with Xymon is that you don't have to configure so many things so verbosely as you need to do that Nagios even only reports a single thing. Just one line per host and most stuff works out of the box.

Changed in xymon (Ubuntu):
status: New → Opinion
Revision history for this message
Arie Skliarouk (skliarie) wrote :

Ok, what about providing /etc/xymon/clientlaunch.d/README file with following content:
-------------------------
The directory is the place for custom configuration that will not be affected on xymon upgrade.
The files must have .cfg extension.
-------------------------

Revision history for this message
Axel Beckert (xtaran) wrote : Re: [Bug 401393] Re: Warn if clientlaunch.d file name requirements are not met

Hi Arie,

Arie Skliarouk wrote:
> Ok, what about providing /etc/xymon/clientlaunch.d/README file with following content:
> -------------------------
> The directory is the place for custom configuration that will not be affected on xymon upgrade.

That's not really true.

Myabe you meant:

   In this directory, xymon client extensions can place their
   configuration files. Manually added configuration files may not be
   handled automatically on package upgrades.

> The files must have .cfg extension.

Will add that one for sure.

  Regards, Axel
--
 ,''`. | Axel Beckert <email address hidden>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
  `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5

Axel Beckert (xtaran)
Changed in xymon (Ubuntu):
status: Opinion → Fix Committed
assignee: nobody → Axel Beckert (xtaran)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xymon - 4.3.17-4

---------------
xymon (4.3.17-4) unstable; urgency=medium

  * Add debconf question to disable the automatic migration from hobbit to
    xymon. (hobbit-client/automatic-xymon-migration; default true)

 -- Christoph Berg <email address hidden> Thu, 23 Oct 2014 14:31:57 +0200

Changed in xymon (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers