[syslog-ng] Customizing syslog-ng snmp() destination option

Maurya, Shivani shivani.maurya at intel.com
Tue Mar 22 06:09:32 UTC 2022


Hi Gabor,

I have captured the traffic which we are forwarding using snmp()  –

[cid:image001.png at 01D83DE1.7C82C330]

But this is how I want an extra field to be added in trap itself before the variable-binding -

[cid:image002.png at 01D83DE1.7C82C330]

Regards,
Shivani Maurya

From: Nagy Gábor <gabor.hl at gmail.com>
Sent: Tuesday, March 22, 2022 12:11 AM
To: wernli at in2p3.fr; Syslog-ng users' and developers' mailing list <syslog-ng at lists.balabit.hu>; Maurya, Shivani <shivani.maurya at intel.com>
Subject: Re: [syslog-ng] Customizing syslog-ng snmp() destination option

Hi,

I'm not an SNMP expert, but I looked around and I don't know if what you ask is possible with SNMP protocol.
Can you show an example of what this trap would look like, please?
What is the difference on the receiving side (e.g. with snmptrapd)?

Regards,
Gabor

Fabien Wernli <wernli at in2p3.fr<mailto:wernli at in2p3.fr>> ezt írta (időpont: 2022. márc. 21., H, 17:31):
Hi,

On Mon, Mar 21, 2022 at 04:12:19PM +0000, Maurya, Shivani wrote:
> I wanted to add a field "agent-addr" as part of the trap & not in the variable-binding. This field "agent-addr" will contain the IP address of the device which is sending the syslog message to the syslog server. How can I add a customized filed as part of the trap?

The documentation of the snmp destination is here https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.33/administration-guide/49#TOPIC-1663343
You can use syslog-ng macros inside the snmp-obj parameter.

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20220322/a4424e18/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 11928 bytes
Desc: image001.png
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20220322/a4424e18/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 16113 bytes
Desc: image002.png
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20220322/a4424e18/attachment-0003.png>


More information about the syslog-ng mailing list