Re: Customizing syslog-ng snmp() destination option

"Maurya, Shivani" <[email protected]>
Newsgroups gmane.comp.syslog-ng
Message-ID <DM4PR11MB5502B08AE0EB31F22CF2533890189@DM4PR11MB5502.namprd11.prod.outlook.com>
Hi Gabor,

Can you please help here?

Regards,
Shivani Maurya

From: Maurya, Shivani
Sent: Tuesday, March 22, 2022 10:27 PM
To: Gabor Nagy (gnagy) <[email protected]>; [email protected]; Syslog-ng users' and developers' mailing list <[email protected]>
Subject: RE: [syslog-ng] Customizing syslog-ng snmp() destination option

Hi Gabor,

We want to use snmpv2v/snmpv3 only going forward. This is the reason I want to add the field "agent-addr". Is there a way to add "agent-addr" field with snmpv2c/snmpv3 ?

Regards,
Shivani Maurya

From: Gabor Nagy (gnagy) <[email protected]<mailto:[email protected]>>
Sent: Tuesday, March 22, 2022 8:48 PM
To: Maurya, Shivani <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>; Syslog-ng users' and developers' mailing list <[email protected]<mailto:[email protected]>>
Subject: Re: [syslog-ng] Customizing syslog-ng snmp() destination option

Thanks Shivani for the example!

I didn't know "agent-addr" is a standardized SNMPv1 trap element.
I've found it in the SNMPv1 RFC too. [1]

Unfortunately, syslog-ng only supports snmpv2c and snmpv3 versions.
I've checked the code of snmp-dest() and I think it would be _relatively_ easy to add snmpv1 support.
I can open a feature request on GitHub, as I'm not sure when we could get to this in the near future, or is there any reason against SNMPv1.

Regards,
Gabor


[1] https://datatracker.ietf.org/doc/html/rfc1157/#section-4.1.6
________________________________
From: syslog-ng <[email protected]<mailto:[email protected]>> on behalf of Fabien Wernli <[email protected]<mailto:[email protected]>>
Sent: Tuesday, March 22, 2022 8:12
To: Maurya, Shivani <[email protected]<mailto:[email protected]>>
Cc: Syslog-ng users' and developers' mailing list <[email protected]<mailto:[email protected]>>
Subject: Re: [syslog-ng] Customizing syslog-ng snmp() destination option

CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.


Hi again,

On Tue, Mar 22, 2022 at 06:09:32AM +0000, Maurya, Shivani wrote:
> But this is how I want an extra field to be added in trap itself before the variable-binding -
>
> [cid:[email protected]]

As I said, I think you can achieve this using `snmp-obj()`.
Try the following:

    snmp-obj('.1.3.6.1.6.3.18.1.3.0', 'Ipaddress', "${SOURCEIP}")

______________________________________________________________________________
Member info: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&amp;data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C1341f1fe92104de79ae708da0bd35bee%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637835299655341547%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=mJAT2oTdxOtlg%2FviRHWvJfDuGCGeAPABN%2BCqDmuFA9Q%3D&amp;reserved=0
Documentation: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&amp;data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C1341f1fe92104de79ae708da0bd35bee%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637835299655341547%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Nojx51D6YkOswnnLzog1ykOV3D39L8cv%2B4NLIRm%2BkNU%3D&amp;reserved=0
FAQ: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&amp;data=04%7C01%7Cgabor.nagy%40oneidentity.com%7C1341f1fe92104de79ae708da0bd35bee%7C91c369b51c9e439c989c1867ec606603%7C0%7C1%7C637835299655341547%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=u3FuE5V2S8%2BCWe2k6AupGSQ%2F6gX3j4SMvMDTchwJuOM%3D&amp;reserved=0

______________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.