You could use counters something like this
<Input in>
Module im_tcp
Port 2345
Exec create_stat("msgrate", "RATE", 3600); add_stat("msgrate",
1);
<Schedule>
Every 3600 sec
Exec create_stat("msgrate", "RATE", 10); add_stat("msgrate", 0);
Exec if defined get_stat("msgrate") and get_stat("msgrate") <= 1
\
{ \
log_error("No messages received from the source!"); \
}
</Schedule>
</Input>
On Tue, Aug 26, 2014 at 1:31 AM, Cameron Kerr <cameron.kerr...@gmail.com>
wrote:
> I would like to have a watchdog for nxlog, as I've found a few occasions
> recently where nxlog (on RHEL5, build from source using the provided spec
> file) was no-longer able to send (or have its sent messages received) by a
> receiving nxlog instance (on RHEL6)
>
> I'm not sure of why this is (there was nothing logged at INFO level), but
> I do know that restarting nxlog on the receiving side (or pointing the
> sender to a different receiver) was sufficient to restore service.
>
> I would much prefer to have some sort of 'liveness' test (not merely
> ensuring that there is a process called 'nxlog') that could be used as a
> test to restart a likely failed nxlog instance.
>
> Ideally, I'd like to be able to take a core-dump etc. of when this happens
> for further root-cause analysis.
>
> Considering there is never any silent time of the day, I would be happy
> with a test that was based on number of events processes in [some small
> number] of minutes.
>
> Or I suppose I could just pass in a particular log message, and then check
> to see that it has come though...
>
>
> Has anyone done anything similar and would like to share what they have
> done?
>
> Cheers,
> Cameron
>
> --
> Cameron Kerr <cameron.kerr...@gmail.com>
> See my blog at http://distracted-it.blogspot.co.nz/ (previously
> http://humbledown.org/)
> Skype me on cameron.kerr.nz
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> nxlog-ce-users mailing list
> nxlog-ce-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
>
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users