9 Replies Latest reply on Apr 3, 2013 9:27 AM by ouberlord

    Giving engineers "Unmanage Nodes" rights

    SimonMorris

      Hello,

      I've setup Orion so that only one or two people have Manage Nodes rights (so that we have consistency and standards adhered to) but I'd like others in the team to be able to Unmanage Nodes, to suppress alerts when work is carried out.

      Am I right in saying this isn't possible with Orion 9.5.0?

      As far as I can see a user needs Manage Nodes rights to put it into Unmanaged State, it would be good to seperate this from actually reconfiguring how the node is monitored.

      Thanks

      ~sm

        • Re: Giving engineers "Unmanage Nodes" rights
          Steven Klassen

          That's right, setting nodes managed/unmanaged is under the "node management" (or some similar name, I forget) permission in their user profile. Either you give them complete control over making adjustments to the node or nothing at all.

            • Re: Giving engineers "Unmanage Nodes" rights
              SimonMorris

              I suppose if I knew the underlying database information written to the Orion database I could write my own wrapper around "Unmanage"...


              Worth an evenings hacking :-)

              Thanks for the reply

              ~sm

                • Re: Giving engineers "Unmanage Nodes" rights
                  Steven Klassen


                  I suppose if I knew the underlying database information written to the Orion database I could write my own wrapper around "Unmanage"...

                   



                  It's real easy - in the Nodes table there are 3 fields (from memory): Unmanaged (boolean or int, some flag'ish thing), UnmanageUntil (datetime), UnmanageFrom (datetime). As long as you put a time in the UnmanageUntil that's far enough in the future and flip the Unmanaged bit the node will be unmanaged.

                  1 of 1 people found this helpful
                    • Re: Giving engineers "Unmanage Nodes" rights
                      SimonMorris

                      Great, I got it working... thanks for the pointers.

                      This is the view that engineers without Manage Nodes rights get, and they can unmanage the node using the IFRAME, plus I get to track the name and reason for the outage.

                      It's done in Django and I'm happy to share the code if anyone wants.

                       

                        • Re: Giving engineers "Unmanage Nodes" rights
                          Steven Klassen


                          It's done in Django and I'm happy to share the code if anyone wants.

                           



                          Right on, a fellow python man. I'd be very interested in seeing the code! =) Shoot me a message via thwack or email @ sklassen at sigmasolinc dot com?

                            • Re: Giving engineers "Unmanage Nodes" rights
                              SimonMorris

                              Hello,

                              The codes here... it doesn't really work as a standalone app as it imports Host definitions from our CMDB, but you can see the interesting part of the code in unmanage_server.models in the save() function.

                              It saves it the Unmanaged Period to the Django database with the person who created it, and the reason, and as it saves fires a line of SQL to the Orion server.

                              if address_found:
                                   cur.execute("UPDATE Nodes SET UnManaged = 1 WHERE NodeID = '%s'" % row_id )
                                   conn.commit()

                              It works nicely for me at the moment.

                              Thanks

                              ~sm

                               

                              [View:/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.04.18.64/unmanage_5F00_servers.tar.gz]

                                • Re: Giving engineers "Unmanage Nodes" rights
                                  Steven Klassen


                                  The codes here... it doesn't really work as a standalone app as it imports Host definitions from our CMDB, but you can see the interesting part of the code in unmanage_server.models in the save() function.

                                  It saves it the Unmanaged Period to the Django database with the person who created it, and the reason, and as it saves fires a line of SQL to the Orion server.

                                  if address_found:
                                       cur.execute("UPDATE Nodes SET UnManaged = 1 WHERE NodeID = '%s'" % row_id )
                                       conn.commit()

                                  It works nicely for me at the moment.

                                   



                                  Outstanding. Thanks for sharing! =)

                                  • Re: Giving engineers "Unmanage Nodes" rights
                                    ouberlord

                                    Hello Simon,

                                     

                                    I know it has been a couple of years since this topic was active, but would you by chance still have that file laying around?  The link in your post appears to no longer be valid, and we are looking to achieve the exact same thing that you seemingly have already accomplished.

                                     

                                    Thank you,

                                     

                                    -Tony

                        • Re: Giving engineers "Unmanage Nodes" rights
                          viol8tor

                          Hello Simon,

                           

                          If your intent is strictly to stop alerts from being emailed, you can do the following:

                          This is strictly an On / Off method. 

                          Create a custom true/false field called Production in Custom Node Properties.

                          For related alerts, under alert suppression, suppress alerts when Production = False.

                          (You can also set this in the alert trigger, if you prefer, only trigger the alert when Production=True.)

                          Expose Field 'Production' in your device views via Edit Custom Node Property. (Anybody should be able to edit this field.)

                          - you can run a sql update to populate the initial values in your nodes table.

                          update nodes

                          set Production = 'True'

                           

                           

                           

                          Otherwise, I have had occasions where I've created multiple accounts for users.  1 standards account for every day use and another admin account with account limitations.

                           

                          -v