Custom Events from syslog with reverse DNS lookup
-
I need to have reverse DNS lookup on the message portion of a custom event that is created from a syslog message. For instance I have create an event from a syslog message and the event looks like the below (taken from a proxy):
20.01.2015 06:35:43 firewall Warning PROXY_BLOCK Blocked Category: Web Ads; Srcip: 10.30.29.45; Name: web request blocked, forbidden category detected; statuscode: 403; URL: https://googleads.g.doubleclick.net/I need a reverse lookup on the message portion of the event to convert the "Srcip" to hostname or FQDN instead of IP. Currently I do this manually but it would be great to automate this with NetXMS. Is this possible? Anyone know?
-
General answer is "no" - nxsl do not provide any way to do a back resolve. We can add function for that and then it can be implemented quite easily: in EPP, in create alarm / send notification section – you use %{scriptName} instead of the message (%m, usually), and in this "scriptName" (from Script Library) you do any transformation you like (extract IP, resolve and combine message back together). You can register feature request in our bug tracker: https://dev.raden.solutions/projects/netxms/.
Right now you can do this kind of a hack:
- in EPP add "execute external application" as action
- write script (shell, python, application - anything), which split message, extract IP, do back resolve, compose new message
- push it back to NetXMS using "nxevent" command line utility. Note, you should use different event for that – or you'll create infinite loop.
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login