On Monday 18 March 2019 at 21:39:33, Václav Mach wrote:

> On 3/18/19 9:08 PM, Antony Stone wrote:
> > On Monday 18 March 2019 at 21:00:45, Václav Mach wrote:
> >> I've not seen a thing that worked on console and not in the actual
> >> configuration. What output do you get when you try step by step (like
> >> above) while using log function?
> > 
> > If I could get the log() function to actually put anything into
> > /var/log/icinga2/icinga2.log, I'd be rather happier than I am now...
> 
> I'm not sure about that. If you're not using director or some other way
> of dynamic config,

I'm not.

> it should be enough to just edit the config files and then check the current
> configuration by 'icinga2 daemon -C'.

If I'm getting syntax errors, that's precisely how I check for them.

> This command just takes the current configuration and evaluates it.
> While this is happening, your debug log() calls also get evaluated and
> you get some of output. Not a great way to debug it, but at least
> something.

Eh?

The code is not "run" when doing "icinga2 daemon -C" - there's no output to 
/var/log/icinga2/icinga2.log, and there's no output from the log() functon 
calls on the console - it just reports the number of different types of 
ConfigItems etc (and any syntax errors if there are any).

What I was expecting log() to do was to put something into the standard 
Icinga2 log file when the function call got executed, so that I could see what 
the code was doing at the time.

As it is, all I can use for now is the output of the Notification, which sends 
me an email.  Effective, but a bit slow and a bit tedious...


Antony.

-- 
If you were ploughing a field, which would you rather use - two strong oxen or 
1024 chickens?

 - Seymour Cray, pioneer of supercomputing

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to