[smokeping-users] config includes not reparsed during reload

Tobi Oetiker tobi at oetiker.ch
Fri Sep 21 19:09:58 CEST 2007


Jon,

you are right ... this should help:

Index: lib/Smokeping.pm
===================================================================
--- lib/Smokeping.pm    (revision 834)
+++ lib/Smokeping.pm    (working copy)
@@ -4021,6 +4021,8 @@
         my $cfgfile = shift;
         my ($oldcfg, $oldprobes) = ($cfg, $probes);
         do_log("Reloading configuration.");
+        $cfg = undef;
+        $probes = undef;
         eval { load_cfg($cfgfile) };
         if ($@) {
                 do_log("Reloading configuration from $cfgfile failed: $@");


cheers
tobi
Today Jon Greaves wrote:

> Hi Tobi,
>
> A restart works fine but a reload doesn't.
>
> The following is logged when I issue smokeping --reload having changed
> 'config.servers' which is included in main 'config'
>
> Sep 21 16:07:25 xxxxxxxxxx smokeping[9461]: Config file unmodified,
> skipping reload
>
> JonG
>
> -----Original Message-----
> From: Tobias Oetiker [mailto:tobi at oetiker.ch]
> Sent: 21 September 2007 15:55
> To: Jon Greaves
> Subject: Re: [smokeping-users] config includes not reparsed during
> reload
>
> Hi Jon,
>
> if you change an included file the config does not get reloaded
> automatically yes.
>
> does it also not work if you send smokeping a sig HUP ?
>
> cheers
> tobi
> Today Jon Greaves wrote:
>
> > Hi Tobi,
> >
> > When you use smokeping reload and the config file uses the @include
> > directive the files specified are not check for changes when the
> > reload is done. We noticed this because we are using the @include to
> > build the config from a set of files one of which is a CMDB
> > dynamically created list of devices to ping. If the devices to ping
> > include is updated and reload smokeping the running config appears to
> not change.
> >
> > Regards
> > JonG
> >
> >
> > The information contained in this e-mail and its attachments is
> confidential.
> > It is intended only for the named address(es) and may not be disclosed
> to anyone else without Attenda's consent.
> >
> >
>
> --
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
> http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
>
>
> The information contained in this e-mail and its attachments is confidential.
> It is intended only for the named address(es) and may not be disclosed to anyone else without Attenda's consent.
>
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902



More information about the smokeping-users mailing list