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. Template Services

Template Services

Scheduled Pinned Locked Moved Support
11 Posts 2 Posters 22.3k 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.
  • V
    V
    Victor Kirhenshtein
    wrote on last edited by
    #2

    Hi!

    It's nice to see that such solutions are possible with NetXMS 🙂 I hope you'll describe this in wiki when it will be working.

    I would optimize this a bit by using nxevent instead of nxpush on step 3 and just calling script from library on some custom event. Also, if writing some Java code is an option, you can create simple class that will set custom attributes directly using NetXMS Java API. Otherwise solution looks good.

    Best regards,
    Victor

    1 Reply Last reply
    0
    • L
      L
      lweidig
      wrote on last edited by
      #3

      Appreciate the suggestions, will post to wiki as an example.  I notice that nxevent is not installed on my system however and is only in the client folder when viewing the source code trees which we have for viewing but install using the .deb files.  Does this only come from .deb installation if you install the console package?  Seems like some of this should be included in the server build as well.

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

        nxevent is a client tool and is not included into server deb file. I'll create separate deb file with client/integration tools.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • L
          L
          lweidig
          wrote on last edited by
          #5

          Yes, that and the other tools provided in the console install as a package of its own would be great.  Thanks!

          1 Reply Last reply
          0
          • L
            L
            lweidig
            wrote on last edited by
            #6

            In the interim until there is a package for the tools we have compiled them and installed (pretty simple of course, but prefer packages).  However, I have yet to figure out the how to get nxevent to work, this is running on the same box as the server.  I have also tried all the combinations below replacing the XL_TESTEVENT name with the number assigned and the same results.  Here is what I get:

            # nxevent -d -e -P MyPassword -u myser 123.123.123.123 XL_TESTEVENT
            *debug* SendMsg("CMD_GET_SERVER_INFO", id:0)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:0)
            *debug* SendMsg("CMD_REQUEST_ENCRYPTION", id:1)
            *debug* RecvMsg("CMD_REQUEST_SESSION_KEY", id:1)
            *debug* SendMsg("CMD_SESSION_KEY", id:1)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:1)
            *debug* SendMsg("CMD_LOGIN", id:2)
            *debug* RecvMsg("CMD_LOGIN_RESP", id:2)
            *debug* SendMsg("CMD_TRAP", id:3)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:3)
            Unable to send event: Access denied
            *debug* Network receiver thread stopped
            

            Have also tried this to localhost (127.0.0.1) and using the event number instead of name.  Have tried it with no username / password:

            *debug* SendMsg("CMD_GET_SERVER_INFO", id:0)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:0)
            *debug* SendMsg("CMD_REQUEST_ENCRYPTION", id:1)
            *debug* RecvMsg("CMD_REQUEST_SESSION_KEY", id:1)
            *debug* SendMsg("CMD_SESSION_KEY", id:1)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:1)
            *debug* SendMsg("CMD_LOGIN", id:2)
            *debug* RecvMsg("CMD_LOGIN_RESP", id:2)
            *debug* Network receiver thread stopped
            Unable to connect to server: Access denied
            

            No username/password and no encryption:

            *debug* SendMsg("CMD_GET_SERVER_INFO", id:0)
            *debug* RecvMsg("CMD_REQUEST_COMPLETED", id:0)
            *debug* SendMsg("CMD_LOGIN", id:1)
            *debug* RecvMsg("CMD_LOGIN_RESP", id:1)
            *debug* Network receiver thread stopped
            Unable to connect to server: Access denied
            

            The user is setup in the server and at this point has ALL the permissions set just to make sure that was not causing issues.  Can you let me know what might be happening.  Also, what is the MINIMAL permissions that can be given and still allow the submission of nxevents.  Finally, should the <event_id> be specified by the name or the number? 

            Thanks!

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

              User must have "send events" access right on source object, i.e. if you are sending event from management server itself, user must have "send events" right on node object representing management server. This is the only requirement for that user. You can only use event codes in nxevent (it have to be fixed).

              Best regards,
              Victor

              1 Reply Last reply
              0
              • L
                L
                lweidig
                wrote on last edited by
                #8

                Yep, that resolved it.  Thought the rights on  the nodes were a subset / fine tooth version of the user rights.  It is working.  Off to automatic service profiling for me.......

                1 Reply Last reply
                0
                • L
                  L
                  lweidig
                  wrote on last edited by
                  #9

                  Ok, I have all of the automatic port / service detection working and I will try to get this all up on the Wiki at some point soon.  Here is the next issue that I am facing in regards to templating services.  Let's just take Telnet as an example as it is very simple.

                  If the node is running an agent this is pretty much a non-issue.  I can create the necessary DCI(s) and away we go.  However, many of the devices we are looking to monitor are things like access points, routers, switches,... which of course cannot run the agent.

                  I see a few possible solutions but not sure which / if any can be accomplished:

                  1.  We need a way to bind network services to templates.
                  2.  I need some way to create a DCI on the server to use the agent it is running to perform the check for me.  Cannot figure out how to do this via scripting in the server.
                  3.  If we setup the Proxy on the node to check to be the server can we then create a DCI ServiceCheck right on that node and will this work?

                  Any suggestions would be appreciated.

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

                    Hello!

                    You can set "proxy node" directly in DCI. For example, you have node A without agent, and node B with agent and portcheck subagent, you can create DCI on node A with source agent, name ServiceCheck.xxx, and proxy node set to node B. Then you will have DCI on node A, but real data collection will be done from node B.

                    Best regards,
                    Victor

                    1 Reply Last reply
                    0
                    • L
                      L
                      lweidig
                      wrote on last edited by
                      #11

                      Learning more about this each day and it only keeps getting BETTER!  Thanks for the reply, this will solve the issue very well and offers exactly what I need.

                      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