21 Replies Latest reply on Nov 4, 2010 7:39 AM by DThorne

    Manually edit location?

    JustinY

      I have a node that I only monitor via icmp.  I dont have access to the server, but it hosts our website so I like to monitor if its at least reachable.  I have all our devices grouped by location, and because this does not have snmp it does not have a location set.  Can I manually edit the location info for this node?


      My guess is that it can probably be done in the database, but it would be nice to have the ability for nodes that are not snmp notes to be able to manually edit those fields.


       


        • Re: Manually edit location?
          joehanly

          Justin


          The  Location is pulled from the SNMP information on the device. Since the device is not SNMP enabled then The only option you have is to edit the database and Type in the location in there in the location Field . The other option you have is to use custom properties For grouping the devices.


          Regards


           


          -J

            • Re: Manually edit location?
              JustinY

              I tried to manually edit the location field in the database, but it did not seem to stick.  It would just revert back to 'null' after a few seconds.

              • Re: Manually edit location?
                ecornwell

                Is there anyway this can be done via a custom property or through another method?   We are running into the same problem and would like to use the Location field but some devices are either incorrect (because the vendor didn't give access to all snmp settings) or not available because of no snmp. 


                 To us if we could have it like a custom property where if it was blank it used the snmp found value but if we set it to something it would use the value we set. 

                  • Re: Manually edit location?
                    tdanner

                    You could probably put together a calculated SQL column. First add a custom property (I call it "CustomLocation" but you could call it anything), then run SQL like this:

                    ALTER TABLE Nodes ADD COLUMN EitherLocation AS ISNULL(CustomLocation, Location)

                    Then use Custom Property Editor to update your report schemas again. Now you will have a custom property called "EitherLocation" that behaves like you describe: if CustomLocation is non-null, it will be used. Otherwise the Location column (populated from SNMP) will be used instead.

                      • Re: Manually edit location?
                        ecornwell

                        Thank you very much!  Would this be considered "supported?"


                         


                        • Re: Manually edit location?
                          ecornwell

                          You could probably put together a calculated SQL column. First add a custom property (I call it "CustomLocation" but you could call it anything), then run SQL like this:

                          ALTER TABLE Nodes ADD COLUMN EitherLocation AS ISNULL(CustomLocation, Location)

                          Then use Custom Property Editor to update your report schemas again. Now you will have a custom property called "EitherLocation" that behaves like you describe: if CustomLocation is non-null, it will be used. Otherwise the Location column (populated from SNMP) will be used instead.

                           



                           Is there any chance this would break the web interface for adding nodes?  I've tried to add a few today and keep getting script errors on the page. 

                          Line: 6
                          Char: 62099
                          Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.  The status code returned from the server was: 500
                          Code: 0
                          URL: http://NPMSERVER:8080/Orion/Nodes/Add/Properties.aspx

                          The device gets added but none of the properties are there.

                            • Re: Manually edit location?
                              tdanner

                              Uh oh - yes, the web interface is going to try to set all the properties. Since "EitherLocation" is a calculated property, you can't set it. My apologies - I didn't think about that angle when I made this suggestion.

                              Let me see if I can find a workaround for you.

                                • Re: Manually edit location?
                                  tdanner

                                  Try this. In \inetpub\solarwinds\Orion\Nodes\Controls\CustomProperties.ascx.cs, find these lines (around line #106)

                                          IList<string> customProperties = SolarWinds.Orion.Web.CustomPropertyManager.GetPropNamesForTableClean(NetObjectType);
                                          repCustomProperties.DataSource = customProperties;
                                          repCustomProperties.DataBind();

                                  Insert a line in the middle so it looks like this:

                                          IList<string> customProperties = SolarWinds.Orion.Web.CustomPropertyManager.GetPropNamesForTableClean(NetObjectType);
                                          customProperties.Remove("EitherLocation");
                                          repCustomProperties.DataSource = customProperties;
                                          repCustomProperties.DataBind();

                                  Change the "EitherLocation" string to whatever you actually named the calculated property. Let me know if that works.

                                  • Re: Manually edit location?
                                    ecornwell

                                    That worked great!  


                                    Has there been any thought to a couple of things... 
                                    1. Being able to define which Custom Properties are visable via the web page. (IE for EitherLocation, etc...)
                                    2. Being able to add some text next to the custom properties as a kind of help text for people who are adding nodes.

                                    Example


                                    Region:            ______________              Enter the region the device exists in.
                                    NCM_Import:    ______________              Enter True if the device is a Cisco device, enter false for all other devices.