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. Feature Requests
  3. Create containers, conditions, nodes, bind objects, etc. from filter script

Create containers, conditions, nodes, bind objects, etc. from filter script

Scheduled Pinned Locked Moved Feature Requests
16 Posts 2 Posters 33.1k 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!

    Scripting slowly moves to more and more areas of NetXMS 🙂 I agree that creating and binding objects from scripts is a very good idea. I'm not sure, however, that auto bind script is the best place to create additional objects. For network discovery purposes, additional hook will be better. For example, it can be done that way that for each newly added node system executes some script from library. Or take more generic approach, and allow script execution as action in event processing policy - that way you will be able to execute your script on each SYS_NODE_ADDED event, as well as do many other things for other events.

    Best regards,
    Victor

    1 Reply Last reply
    0
    • T
      T
      testos
      wrote on last edited by
      #3

      Hi Victor, thanks for your reply.
      I completely agree with you, event processing policy is the best place, but now the binding process should be made by calling corresponding function from script.
      I’m trying to use NetXMS in a fairly extensive network (more than 400 locations) and manual deployment work (object by object) is quite hard, since many of data to be incorporated into NetXMS come from external data sources.
      It would be extraordinary through scripts we could automate any action we can do through menu options: create, modify, binding, removing objects, ...and if it were possible to read and write text-delimited files on the server, we could do anything in NetXMS. Sounds great.
      Best Regards.

      1 Reply Last reply
      0
      • T
        T
        testos
        wrote on last edited by
        #4

        To handle a large amount of objects could also be interesting to have a special tool to read a formatted text file and load it on the NetXMS server in batch mode.

        1 Reply Last reply
        0
        • T
          T
          testos
          wrote on last edited by
          #5

          Hi!

          Is there any news about these requirements?

          Best regards.

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

            No news, sorry. I keep this in mind, but there are always something to do. Now I'm trying to create to-do lists for each release and follow them. 1.1.8 is already scheduled, so I have added to 1.1.9 to-do.

            Best regards,
            Victor

            1 Reply Last reply
            0
            • T
              T
              testos
              wrote on last edited by
              #7

              Nothing happens, too many things  😮

              1 Reply Last reply
              0
              • T
                T
                testos
                wrote on last edited by
                #8

                As a workaround, I am currently using a AutoIt script in the new java console. That script reads a external text file and create new containers, node, conditions, assigned to them several properties, transformation scripts, etc..
                But I have real difficulties with interfaces list, for example to select all interfaces of a node or an interface with a certain IP, to define DCI's for one or more interfaces, etc..
                Perhaps this would be easier showing all interfaces in a SysListView32 tab control in addition to deploy it in a SysTreeView32 control.

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

                  I'm actually slowly moving towards ultimate goal - be able to do all this from NXSL scripts. Starting from 1.1.10 you already can run NXSL script as an action. Now I just need to add all necessary Create... functions.

                  Best regards,
                  Victor

                  1 Reply Last reply
                  0
                  • T
                    T
                    testos
                    wrote on last edited by
                    #10

                    Hi Victor.

                    So all these limitations disappear?

                    Most notable one is very limited access to data outside script boundaries. For
                    example, from NXSL script you can neither access files on the server, nor call external programs,
                    nor even access data of any node object, other than the one the script is running for.

                    Best regards

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

                      Hi!

                      Not all. I think that NXSL script should not access external files or programs. If you need that in actions, you can run external script as an actiopn. But access to other objects are possible now. There are few functions which allows you to search for nodes and other type of objects.

                      Best regards,
                      Victor

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

                        Hi!

                        Since 1.2.0 version there are few NXSL functions for object manipulation:

                        CreateContainer
                        RemoveContainer
                        BindObject
                        UnbindObject
                        FindObject

                        I'll add descriptions for them in wiki (http://wiki.netxms.org/wiki/NXSL_Function_Reference).

                        Best regards,
                        Victor

                        1 Reply Last reply
                        0
                        • T
                          T
                          testos
                          wrote on last edited by
                          #13

                          Hi Victor.

                          Awesome!!!, thank you very much for these new features.
                          By the way, bindobject can bind one container to another container?

                          Best regards.

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

                            Yes, BindObject can bind all objects that can be bound from console - nodes, subnets, clusters, and another containers.

                            Best regards,
                            Victor

                            1 Reply Last reply
                            0
                            • T
                              T
                              testos
                              wrote on last edited by
                              #15

                              Wow!! Happy as a lark ;D

                              Please, can you check out BindObject wiki entry?

                              Best regards.

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

                                Checked and corrected 🙂

                                Best regards,
                                Victor

                                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