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. Disable Configuration Poll for All Nodes or Nodes in a container

Disable Configuration Poll for All Nodes or Nodes in a container

Scheduled Pinned Locked Moved Support
5 Posts 4 Posters 20.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.
  • C
    C
    clifford
    wrote on last edited by
    #1

    Hi

    Need to force configuration poll on all devices and then Disable Configuration poll on all devices, is that possible via a template or script, if yes then can someone please share me the howto

    Regards
    Clifford Dsouza

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

      Hi,

      You can do this with nxshell script, like this:

      for node in [o for o in session.getAllObjects() if isinstance(o, objects.Node)]:
        print 'Processing ', node.getObjectName()
        session.pollNode(node.getObjectId(), NodePollType.CONFIGURATION_NORMAL, None)
        md = NXCObjectModificationData(node.getObjectId())
        md.setObjectFlags(node.getFlags() | Node.NF_DISABLE_CONF_POLL)
        session.modifyObject(md)
      

      You can do mass enable of configuration poll like this:

      for node in [o for o in session.getAllObjects() if isinstance(o, objects.Node)]:
        print 'Processing ', node.getObjectName()
        md = NXCObjectModificationData(node.getObjectId())
        md.setObjectFlags(node.getFlags() & ~Node.NF_DISABLE_CONF_POLL)
        session.modifyObject(md)
      

      Best regards,
      Victor

      1 Reply Last reply
      0
      • C
        C
        clifford
        wrote on last edited by
        #3

        Thanks Victor

        The code worked!

        Could it be possible that the things that can be done with executing nxshell script be done via the management interface, it would be great for people like me who get dizzy when we see all that code, makes me wonder how you programmers can retain all that stuff in your heads. 🙂

        This is you 😎 and this is me  😮 :-[ 😢 when i see codes and scripts

        Thanks

        Clifford

        1 Reply Last reply
        0
        • H
          H
          Hamit
          wrote on last edited by
          #4

          Hi!
          Why doesn't it work?

          >>> md.setObjectFlags(node.getFlags() | Node.NF_DISABLE_CONF_POLL)
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          AttributeError: type object 'org.netxms.client.objects.Node' has no attribute 'NF_DISABLE_CONF_POLL'
          

          Or is any way to get 'Poll/Configuration full' via script?

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #5

            Try DCF_DISABLE_CONF_POLL  instead

            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