Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Custom Events from syslog with reverse DNS lookup

Custom Events from syslog with reverse DNS lookup

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 23.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    P
    pryzrak
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      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:

      1. in EPP add "execute external application" as action
      2. write script (shell, python, application - anything), which split message, extract IP, do back resolve, compose new message
      3. push it back to NetXMS using "nxevent" command line utility. Note, you should use different event for that – or you'll create infinite loop.
      1 Reply Last reply
      0
      • P
        P
        pryzrak
        wrote on last edited by
        #3

        Thanks. That does work. However it's the long way around. I posted a feature request to add that to a future release.

        v/r

        1 Reply Last reply
        0

        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
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups