Hi,

Resetting a RATE type counter doesn't make much sense to me, since that's
exactly how it works.
If there are more sources per input module, you could do something like
this:
 create_stat("msgrate-" + $Hostname, "RATE", 3600); 

There is a file_write() procedure that you could use to write out values.
The only problem is that it is not possible to iterate on all the
counters as there is no support for loops in nxlog yet.
You might want to consider using xm_perl to solve more complex issues.

The EE version has a module that can be used to query module statistics
(counters of sent, received events) remotely. This is what we use to
monitor and draw charts on agents' log volume. 

Regards,
Botond

On Tue, 4 Feb 2014 11:37:14 -0700
"Paul Fontenot" <ssdv6...@gmail.com> wrote:

> I was looking over this configuration snippet and have a couple questions,
> can basic connection reporting be done? Meaning, can I have a counter that
> tracks the number of received log entries per hour and write that to a file,
> clear the counter and start over on an hourly basis? And can it tell me
> which source is not reporting or is this an all or nothing setting that
> means the server hasn't received any input in this time period?
> 
> <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>
> 
> 
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> nxlog-ce-users mailing list
> nxlog-ce-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to