News:

We really need your input in this questionnaire

Main Menu

Automatic Groups of Servers

Started by MatthewDreher, October 01, 2016, 12:45:02 AM

Previous topic - Next topic

MatthewDreher

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. 

Tursiops

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.

MatthewDreher

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

Tursiops

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.

MatthewDreher

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?

Tursiops

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.