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. Changing Event Source

Changing Event Source

Scheduled Pinned Locked Moved Support
7 Posts 2 Posters 53.2k 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.
  • J
    J
    jdl
    wrote on last edited by
    #1

    Hi,

    Is there a way to change the event source?
    Here is the purpose of this request...

    Let's assume a server for a particular service piles up information on different entities in some log file. You are only able to install NetXMS agent on this server, not on other entities. But through the log file you can identify some status information for each entity. Now I want to parse this log file, extract the alarms and depending on the entity identified through the parsed text, I want to generate an alarm for that particular entity. So if alarm is critical, the event shall popo up in the entity alarm list and not in the server (where the log file is located) event/alarm list.

    also in the event log, the node name/address shall be the one of the entity and not the one of the server.

    Is there an $event->source attribute or sth similar?

    BTW.: I would appreciate if you could post the list of attributes for event and node if it has changed since last time. Any other objects that event and node? What attribute?

    Many thanks in advance
    Best regards,

    Jdamien

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      It's not possible now to change event source directly - only by resending event via external commands on behalf of different node. I'll think about built-in functionality for changing event source or easy event resending.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • J
        J
        jdl
        wrote on last edited by
        #3

        If I may select one or the other... I would prefer a generic series of built-in fonctions to manage and produce event from within scripts.
        A kind of SendEvent enabling triggering events from within NXSL scripts with all possible arguments configurable by user. And especially the source of the event  😉

        BTW: a similar command line would be powerful as well to integrate in external PERL (and Co) scripts.

        Best regards,

        Jdamien

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          Command line tool for integration already exist - it's called nxevent. It's available on WIndows in server and management console packages, and if you need to build it on UNIX, you must use --with-client option for configure. This tool uses client library for communication with server, and therefore requires login and password. User used for sending event must have "Send events" right on object given as source for event.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • J
            J
            jdl
            wrote on last edited by
            #5

            This sounds great...

            I tried it on Linux (I have compiled server with --with-client option). Here is the error I get:

            /usr/local/netxms/bin/nxevent -u <user> -P <passwd> -o 12 <server_ipAddr> 1000009
            Unable to send event: Invalid or unknown event code

            Could you, please, describe a bit more the differnet parameters required. Only options are describedd in the "help" page.

            Best regards,
            Jdamien

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              Most likely you have one extra 0 in your event code. Automatically assigned codes starts with 100000, so 100009 could be correct.

              Parameters after event code are event-specific data, accessible on server via %1, %2, etc. macros and appropriate variables in NXSL scripts.

              Best regards,
              Victor

              1 Reply Last reply
              0
              • J
                J
                jdl
                wrote on last edited by
                #7

                Correct - one '0' too much.
                Sorry for that.

                It works
                Br,

                Jdamien

                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