Mailing List Archive

Information about current syslog server
Hello,



I am using rsyslog to transfer logs to a primary server. If this server is
unreachable, the transfer is done on a secondary server.

This can be done with 'Failover Syslog Server' mechanism like this

ruleset(name="forwarding" queue.type="linkedList" queue.filename="fwdq") {

action(type="omfwd" target="primary-syslog.example.com" port="10514"

protocol="tcp")

action(type="omfwd" target="secondary-1-syslog.example.com"
port="10514"

action.execOnlyWhenPreviousIsSuspended="on")

action(type="omfwd" target="secondary-2-syslog.example.com"
port="10514"

action.execOnlyWhenPreviousIsSuspended="on")

action(type="omfile" tag="failover" file="/var/log/localbuffer"

action.execOnlyWhenPreviousIsSuspended="on")

}



But I also would like to be warned when the transfer is nominal, that is to
say logs go to primary server, or degraded, that is to say logs go to
secondary server. I had the idea to use omprog output module, between the 2
omfwd, to call a process to warn me, but I guess the treatment will stop
when the command is ok, and the failover will not be handled. Moreover, the
command will be called for each received log in degraded mode.



What is the best approach according to you? Output Modules? Logs analyze?
Connections polling?



Thank you for your help.

David



_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
If you give each action a unique name then you will have usable pstats that can be tracked for transmissions statistics over time. This type of rsyslog telemetry monitoring can be easily accomplished by feeding pstats into any decent event monitoring tool.

Regards,


> On Feb 16, 2021, at 07:44, D. UTEAU via rsyslog <rsyslog@lists.adiscon.com> wrote:
>
> Hello,
>
>
>
> I am using rsyslog to transfer logs to a primary server. If this server is
> unreachable, the transfer is done on a secondary server.
>
> This can be done with 'Failover Syslog Server' mechanism like this
>
> ruleset(name="forwarding" queue.type="linkedList" queue.filename="fwdq") {
>
> action(type="omfwd" target="primary-syslog.example.com" port="10514"
>
> protocol="tcp")
>
> action(type="omfwd" target="secondary-1-syslog.example.com"
> port="10514"
>
> action.execOnlyWhenPreviousIsSuspended="on")
>
> action(type="omfwd" target="secondary-2-syslog.example.com"
> port="10514"
>
> action.execOnlyWhenPreviousIsSuspended="on")
>
> action(type="omfile" tag="failover" file="/var/log/localbuffer"
>
> action.execOnlyWhenPreviousIsSuspended="on")
>
> }
>
>
>
> But I also would like to be warned when the transfer is nominal, that is to
> say logs go to primary server, or degraded, that is to say logs go to
> secondary server. I had the idea to use omprog output module, between the 2
> omfwd, to call a process to warn me, but I guess the treatment will stop
> when the command is ok, and the failover will not be handled. Moreover, the
> command will be called for each received log in degraded mode.
>
>
>
> What is the best approach according to you? Output Modules? Logs analyze?
> Connections polling?
>
>
>
> Thank you for your help.
>
> David
>
>
>
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
Thank you for this quick answer.
If i understood you propose to use statistics about syslog server usage.
But in fact i need to know which is the current syslog server, at any time.
So i don't think stats could help me...

The transitions from primary server to secondary server / from secondary
server to primary server would even be sufficient.




--
Sent from: http://rsyslog-users.1305293.n2.nabble.com/
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
I use pstats to count outbound packets to remote servers…

00:00 server1: 239
00:00 server2: 0
00:00 server3: 0

00:01 server1: 134
00:01 server2: 153
00:01 server3: 0

00:02 server1: 0
00:02 server2: 267
00:02 server3: 0

…and that seems useful enough for me for your use case.

Regards,




> On Feb 17, 2021, at 03:07, DavidU via rsyslog <rsyslog@lists.adiscon.com> wrote:
>
> Thank you for this quick answer.
> If i understood you propose to use statistics about syslog server usage.
> But in fact i need to know which is the current syslog server, at any time.
> So i don't think stats could help me...
>
> The transitions from primary server to secondary server / from secondary
> server to primary server would even be sufficient.
>
>
>
>
> --
> Sent from: http://rsyslog-users.1305293.n2.nabble.com/
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
This looks very interesting !! It's something I've been also looking for!
I want to be able to get some statistics from my server.

I searched for the "pstats", but did not find anything.
Could you help me ?
* How you use it ?
* How can I see the same results for my clients ?


??????? Original Message ???????
On Wednesday, February 17, 2021 2:10 PM, John Chivian via rsyslog <rsyslog@lists.adiscon.com> wrote:

> I use pstats to count outbound packets to remote servers…
>
> 00:00 server1: 239
> 00:00 server2: 0
> 00:00 server3: 0
>
> 00:01 server1: 134
> 00:01 server2: 153
> 00:01 server3: 0
>
> 00:02 server1: 0
> 00:02 server2: 267
> 00:02 server3: 0
>
> …and that seems useful enough for me for your use case.
>
> Regards,
>
> > On Feb 17, 2021, at 03:07, DavidU via rsyslog rsyslog@lists.adiscon.com wrote:
> > Thank you for this quick answer.
> > If i understood you propose to use statistics about syslog server usage.
> > But in fact i need to know which is the current syslog server, at any time.
> > So i don't think stats could help me...
> > The transitions from primary server to secondary server / from secondary
> > server to primary server would even be sufficient.
> > --
> > Sent from: http://rsyslog-users.1305293.n2.nabble.com/
> >
> > rsyslog mailing list
> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
>
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.


_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
see https://www.rsyslog.com/doc/v8-stable/configuration/modules/impstats.html

also see https://www.rsyslog.com/doc/master/configuration/dyn_stats.html

David Lang

On Thu, 18 Feb 2021, odrzen via rsyslog wrote:

> Date: Thu, 18 Feb 2021 23:27:04 +0000
> From: odrzen via rsyslog <rsyslog@lists.adiscon.com>
> Reply-To: odrzen <odrzen@protonmail.com>,
> rsyslog-users <rsyslog@lists.adiscon.com>
> To: rsyslog-users <rsyslog@lists.adiscon.com>
> Cc: odrzen <odrzen@protonmail.com>
> Subject: Re: [rsyslog] Information about current syslog server
>
> This looks very interesting !! It's something I've been also looking for!
> I want to be able to get some statistics from my server.
>
> I searched for the "pstats", but did not find anything.
> Could you help me ?
> * How you use it ?
> * How can I see the same results for my clients ?
>
>
> ??????? Original Message ???????
> On Wednesday, February 17, 2021 2:10 PM, John Chivian via rsyslog <rsyslog@lists.adiscon.com> wrote:
>
>> I use pstats to count outbound packets to remote servers…
>>
>> 00:00 server1: 239
>> 00:00 server2: 0
>> 00:00 server3: 0
>>
>> 00:01 server1: 134
>> 00:01 server2: 153
>> 00:01 server3: 0
>>
>> 00:02 server1: 0
>> 00:02 server2: 267
>> 00:02 server3: 0
>>
>> …and that seems useful enough for me for your use case.
>>
>> Regards,
>>
>> > On Feb 17, 2021, at 03:07, DavidU via rsyslog rsyslog@lists.adiscon.com wrote:
>> > Thank you for this quick answer.
>> > If i understood you propose to use statistics about syslog server usage.
>> > But in fact i need to know which is the current syslog server, at any time.
>> > So i don't think stats could help me...
>> > The transitions from primary server to secondary server / from secondary
>> > server to primary server would even be sufficient.
>> > --
>> > Sent from: http://rsyslog-users.1305293.n2.nabble.com/
>> >
>> > rsyslog mailing list
>> > https://lists.adiscon.net/mailman/listinfo/rsyslog
>> > http://www.rsyslog.com/professional-services/
>> > What's up with rsyslog? Follow https://twitter.com/rgerhards
>> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
>>
>> rsyslog mailing list
>> https://lists.adiscon.net/mailman/listinfo/rsyslog
>> http://www.rsyslog.com/professional-services/
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
>
>
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: Information about current syslog server [ In reply to ]
.. and there is prometheus exporter for `impstats` metrics:
https://github.com/jay7x/rsyslog_exporter_py :-D

On Fri, 19 Feb 2021 at 07:36, David Lang via rsyslog <
rsyslog@lists.adiscon.com> wrote:

> see
> https://www.rsyslog.com/doc/v8-stable/configuration/modules/impstats.html
>
> also see https://www.rsyslog.com/doc/master/configuration/dyn_stats.html
>
> David Lang
>
> On Thu, 18 Feb 2021, odrzen via rsyslog wrote:
>
> > Date: Thu, 18 Feb 2021 23:27:04 +0000
> > From: odrzen via rsyslog <rsyslog@lists.adiscon.com>
> > Reply-To: odrzen <odrzen@protonmail.com>,
> > rsyslog-users <rsyslog@lists.adiscon.com>
> > To: rsyslog-users <rsyslog@lists.adiscon.com>
> > Cc: odrzen <odrzen@protonmail.com>
> > Subject: Re: [rsyslog] Information about current syslog server
> >
> > This looks very interesting !! It's something I've been also looking for!
> > I want to be able to get some statistics from my server.
> >
> > I searched for the "pstats", but did not find anything.
> > Could you help me ?
> > * How you use it ?
> > * How can I see the same results for my clients ?
> >
> >
> > ??????? Original Message ???????
> > On Wednesday, February 17, 2021 2:10 PM, John Chivian via rsyslog <
> rsyslog@lists.adiscon.com> wrote:
> >
> >> I use pstats to count outbound packets to remote servers…
> >>
> >> 00:00 server1: 239
> >> 00:00 server2: 0
> >> 00:00 server3: 0
> >>
> >> 00:01 server1: 134
> >> 00:01 server2: 153
> >> 00:01 server3: 0
> >>
> >> 00:02 server1: 0
> >> 00:02 server2: 267
> >> 00:02 server3: 0
> >>
> >> …and that seems useful enough for me for your use case.
> >>
> >> Regards,
> >>
> >> > On Feb 17, 2021, at 03:07, DavidU via rsyslog
> rsyslog@lists.adiscon.com wrote:
> >> > Thank you for this quick answer.
> >> > If i understood you propose to use statistics about syslog server
> usage.
> >> > But in fact i need to know which is the current syslog server, at any
> time.
> >> > So i don't think stats could help me...
> >> > The transitions from primary server to secondary server / from
> secondary
> >> > server to primary server would even be sufficient.
> >> > --
> >> > Sent from: http://rsyslog-users.1305293.n2.nabble.com/
> >> >
> >> > rsyslog mailing list
> >> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> >> > http://www.rsyslog.com/professional-services/
> >> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> >> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
> myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if
> you DON'T LIKE THAT.
> >>
> >> rsyslog mailing list
> >> https://lists.adiscon.net/mailman/listinfo/rsyslog
> >> http://www.rsyslog.com/professional-services/
> >> What's up with rsyslog? Follow https://twitter.com/rgerhards
> >> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
> myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if
> you DON'T LIKE THAT.
> >
> >
> > _______________________________________________
> > rsyslog mailing list
> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.



--
Yury Bushmelev
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.