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. Automatic Groups of Servers

Automatic Groups of Servers

Scheduled Pinned Locked Moved Support
6 Posts 2 Posters 55.7k 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.
  • M
    M
    MatthewDreher
    wrote on last edited by
    #1

    Hello,

    How would I automatically create groups/views of servers/nodes?  For example: a view where I can see all the servers that are in maintenance mode.

    I'm guessing it may have something to do with the auto apply rules, but I'm not 100% sure. 

    Thank you.

    1 Reply Last reply
    0
    • T
      T
      Tursiops
      wrote on last edited by
      #2

      As you suggested, I'd create Containers and use auto-apply rules/scripts on those.
      I've done similar things to group some systems at our end, not for maintenance though.

      1 Reply Last reply
      0
      • M
        M
        MatthewDreher
        wrote on last edited by
        #3

        Any ideas how I would do that for servers in maintenance mode, and servers with a "problem" of some sort?

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

          For systems with a certain status the following should work:

          if ( $node->status == 4 ) return true;
          return false;
          

          See https://wiki.netxms.org/wiki/NXSL:NetObj for possible status values (the above is for "Critical").
          I couldn't actually see any way to get the actual Maintenance status, yet for all I recall NXSL does allow you to set/unset maintenance status on a node, so I would expect there to be a way to query the current status. However, the above $node->status does not give you that, e.g. it returned "Normal" on a node that was in Normal state when I put it into maintenance mode.

          Also keep in mind that this won't exactly give you a live view either. These rules are only applied when a configuration poll runs against a system, so there could be quite a delay.

          For that, maybe a Dashboard with a Status Map would be more suitable. You can select which severity you want to see. Grouping is available per container, but if you have lots of Critical systems. I am not sure about the refresh here - I can't configure it. But it seems to "flicker" all the time, so that seems more live?
          That map doesn't have an option for "Maintenance" though.

          1 Reply Last reply
          0
          • M
            M
            MatthewDreher
            wrote on last edited by
            #5

            Maybe this could be added then?  And thanks for the info on the node status.  I would just put that as an auto apply rule to the container, right?

            Also, just to make sure, nodes can be in multiple folders at once, right?

            1 Reply Last reply
            0
            • T
              T
              Tursiops
              wrote on last edited by
              #6

              Yes, just adding that as an auto apply rule to a container would work.
              As I said though, this will only update on configuration polls - there could be hours between them.

              And yes, nodes can be in multiple containers.

              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