Start a Conversation

Unsolved

This post is more than 5 years old

1047

January 20th, 2011 14:00

Changing Severity values in Webconsole GUI

Is there a way to change the value of the Severity in Webconsole (SAM 7.2)? I would like to change the Severity 4 and 5 values of “Unknown” and “Normal” to something more meaningful. These names are visible when you hover the pointer over the Severity icon for an alert in the Notification Log Console. It would also be nice to change the “?” and “checkmark” icons for those Severities.

Thanks.

Steve

-------------

Steve Lee

Technical Operations Center

University Technology Services

Emory University

-------------

52 Posts

February 2nd, 2011 10:00

Steve,

     My first impression on that is that it would be possible to do that, but non-trivial.  As you probably know, to the server the "Severity" is a numerical value (unconstrained).  The UI (only in the tooltips) attempts to massage that into a string equivalent.  There is a natural separation between the label we use internally and the actual value.  This is in part to support the idea of the UI in multiple languages.  Assuming you are partially familiar with Java, (in theory) you should be able to override the contents of those labels.

     Internally, it is simply an array of arrays:

private Object[][] contents = {

    { "", "" },

...

     There is an existing operation to replace those values:

import com.smarts.viewer.resources.SmConsNotificationStringsBundle;

import com.smarts.viewer.resources.SmStringsBundle;

     Object[][] newContents = {

          {"ConsNotification.Label_Unknown",                         "New_Unknown"},
          {"ConsNotification.Label_Normal",                              "New_Normal"} ,

     };

     Object[][] contents =  SmConsNotificationStringsBundle.getContents();

     SmStringsBundle.substituteStrings(contents, newContents);

    As a note, I haven't tried doing this as a non-EMC person, but the theory is sound

    Regarding the UI icons, that is potentially even easier.  The icons in question are stored in the masterpiece.jar file.  By placing overrides in the $SM_SITEMOD directory, you can swap one icon for another by swapping the files.

    Again, this isn't for the faint of heart - it is pretty clear that normal users were not intended to change those values.

Regards,

Bill

12 Posts

February 27th, 2011 04:00

Hi.

I don't know in wthat way you want to change severity, but there is simple way to use hook.asl script do do it.

in script you have to define object to event

ex:

eventObj = self->object(NotificationName);

and write some condition

ex:

if ((eventObj->EventName != "Disabled") && ((eventObj->ClassName == "Port")){

     if (glob("*core*",eventObj->Name)){
            eventObj->Severity=1;
  }

}

Regards

Tomasz

13 Posts

February 28th, 2011 07:00

Thanks, Tomasz.

I am more concerned with changing the GUI text values than actualy severities of alerts. For example, for a Severity 4, I would like to change from "Unknown", to, say, "Notice" or similar.

However, your code would certainly help if we were to want to change a specific alert's severity to override the default. I can see where that would come in handy.

Thanks for your comments.

Steve

13 Posts

February 28th, 2011 07:00

Thanks, William.

I could play around with this, though I might be considered one in the "faint of heart" category. Thanks for your suggestion.

Steve

No Events found!

Top