DX NetOps

Expand all | Collapse all

<launch-web-server-script>

Jump to Best Answer
  • 1.  <launch-web-server-script>

    Posted 06-16-2016 08:11 AM

    I get bad characters in my variables when launching web-server-script.

    Executing a bashscript on redhat output into file.

     

    ALARMID = AlarmAttrID.INT_ALARM_ID

    CREATEDATE= AlarmAttrID.CREATION_DATE

     

    alarmid.jpg

     

    Any idea?

    /Roberth



  • 2.  Re: <launch-web-server-script>

    Posted 06-16-2016 03:45 PM

    Hi Robert

     

    Can you paste the command here?  Are you using the <format> option?

     

    Scott



  • 3.  Re: <launch-web-server-script>

    Posted 06-17-2016 01:51 AM

    <action>

            <context>com.aprisma.spectrum.app.alarm.client.group.AlarmContext</context>

              <launch-web-server-script>

                <command>/opt/spectrum/custom/ATG/POB/submit.sh {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13}</command>

                <param>

                  <attribute>AttributeID.MODEL_NAME</attribute>

                </param>

                <param>

                  <attribute>AttributeID.MODEL_OBJECT</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.INT_ALARM_ID</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.ALARM_SOURCE</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.ALARM_STATUS</attribute>

                </param>

                <param>

                  <attribute>0x8e</attribute>

                    <expression>

                      ( value() == null || value().toString().length() == 0 ) ?

                      (Long.toHexString(attrLong(0x11f50)) + "_SPECTRUM_EVT") : value()

                    </expression>

                </param>

                <param>

                  <expression>

                    com.aprisma.spectrum.app.util.context.DefaultApplicationContext.getGlobalParameter(com.aprisma.spectrum.app.util.context.ApplicationContext.USER_PARAMETER_NAME)

                  </expression>

                </param>

                <param>

                  <attribute>AlarmAttrID.CAUSE_TITLE</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.CREATION_DATE</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.IMPACT_SEVERITY</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.ORIGINATING_EVENT</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.SEVERITY</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.TROUBLESHOOTER</attribute>

                </param>

                <param>

                  <attribute>AlarmAttrID.TROUBLE_TICKET_ID</attribute>

                </param>

                <display-exit-status>

                    <status code="1">Unable to open Spectrum DB, please try again!</status>

                    <status code="2">General API failure, try again - if it does not work - report to Systems Management</status>

                    <status code="3">No Receivergroup (troubleshooter) assigned!.</status>

                    <status code="4">A incident already exist, no need to process a new one.</status>

                    <status default="true">Unknown error code {0}</status>

                </display-exit-status>

              <run-for-multiple-alarms />

              </launch-web-server-script>

          </action>



  • 4.  Re: <launch-web-server-script>
    Best Answer

    Posted 06-17-2016 08:53 AM

    Hmm... it could be that OneClick is adding commas when rendering the values.  You could try:

     

    <attribute>AlarmAttrID.INT_ALARM_ID</attribute>

    <expression>

    java.lang.Long.toString( attrLong( AlarmAttrID.INT_ALARM_ID ) )

    </expression>

     

    and

     

    <attribute>AlarmAttrID.CREATION_DATE</attribute>

    <expression>

    java.lang.Long.toString( attrLong( AlarmAttrID.CREATION_DATE ) )

    </expression>

     

     

    Scott



  • 5.  Re: <launch-web-server-script>

    Posted 06-20-2016 03:51 AM

    Perfect, thanks!