pmatt

Scripting performance report designer layouts

Discussion created by pmatt on Oct 15, 2012
Latest reply on Oct 23, 2012 by ntimm

Hi all,

 

I am hoping to save some poor soul from dragging and dropping thousands of QOS objects onto graphs in the PRD. It seems that it will take about 20 minutes manual effort per device, just to get basic interface, CPU, session and memory info set up.

 

Having a look at the XML created on export, it would appear fairly easy to create these on the fly and import them in.

 

<State ver="200">
  <title>Device title</title>
  <TimeStart>1345209973610</TimeStart>
  <TimeStop>1350302052210</TimeStop>
  <liveData>true</liveData>
  <lastPeriod>NaN</lastPeriod>
  <TimeSliders>2,15,0,13</TimeSliders>
  <GraphMaximized>-1</GraphMaximized>
  <groups>
    <group>
      <groupName></groupName>
      <filterId>f1345213573629</filterId>
      <rowSelectors>
        <rowSelector>
          <logical>and</logical>
          <not>false</not>
          <attribute>source</attribute>
          <operator>is</operator>
          <value></value>
        </rowSelector>
      </rowSelectors>
    </group>
  </groups>
  <selectedPage>0</selectedPage>
  <page>
    <row>
      <chart>
        <stacked>false</stacked>
        <showLegend>true</showLegend>
        <legend>
          <last>true</last>
          <max>true</max>
          <average>true</average>
          <percentile>true</percentile>
          <stdDev>false</stdDev>
        </legend>
        <title>HA</title>
        <infoText/>
        <series>
          <r_table>RN_QOS_DATA_0125</r_table>
          <table_id>117889</table_id>
          <unit>B/s</unit>
          <unit_short>B/s</unit_short>
          <displayName>172.23.205.36|QOS_INTERFACE_TRAFFIC|IN-ethernet0/0</displayName>
          <graphColor>32768</graphColor>
          <style>line</style>
          <scale>1</scale>
          <pLine>
            <active>false</active>
            <percentile>95</percentile>
          </pLine>
        </series>
        <series>
          <r_table>RN_QOS_DATA_0125</r_table>
          <table_id>117890</table_id>
          <unit>B/s</unit>
          <unit_short>B/s</unit_short>
          <displayName>172.23.205.36|QOS_INTERFACE_TRAFFIC|OUT-ethernet0/0</displayName>
          <graphColor>8388608</graphColor>
          <style>line</style>
          <scale>1</scale>
          <pLine>
            <active>false</active>
            <percentile>95</percentile>
          </pLine>
        </series>
      </chart>

 

Each row and chart looks to just have a reference to a table_ID which shouldn't be too hard to pick out, give a name and write to a file.

 

The only fields that concern me, because they may be unique are

<TimeStart>1345209973610</TimeStart>
  <TimeStop>1350302052210</TimeStop>

<filterId>f1345213573629</filterId>


Does anyone know what these mean? Am I likely to break everything by starting to import malformed XML? Should I approach it from the database side instead?

 

thanks

Paul

Outcomes