Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

New Report Condition Elements in opConfig 4.2.1

...

Report Conditions has been extended to allow passing of structured data, this can be used to show urls, tooltips or buttons to kick off new virtual operator jobs.

Instead of returning a perl list you pass back an array of hashes.

Code Block
languageperl
return { success => 1,
          conditions => { 
            "ReportConditions" => [
				{
					message => "Interface has high util",
					url => "http://example.com/kb/interface/util",
					url_label => "KB Interface Util",
  					condition => 1,
				}
			],
          },
        };

Required values for condition elements

KeyValue
messageString - Message
condition0 means a bad state for this condition, 1 means a good state for the condition, undef signals that the state of this condition is not known.

URL Cell

You can have the conditions table render a URL cell in one or many rows.

KeyValue
urlhttp or https link
url_labelOptional label for the link, if none if given then the url is displayed

Code Block
languageperl
push(@foundConditions, {
  message=> "Interface $interface has HIGH percentage of INPUT packets being switched by the processor.",
  url => "http://example.com/knowlege",
  url_label => "Knowledge Base",
  condition => 1,
}); 


Tooltips

Render a link which when the user clicks displays a tooltip.

KeyValue
TooltipString to render in the tooltip view

Code Block
languageperl
push(@foundConditions, {
  message=>"Interface $interface has HIGH percentage of OUTPUT packets being switched by the processor.",
  tooltip => "This is a bad thing, you should release the monkeys",
  condition => 0,
}); 

Tagging

KeyValue
ts_tagTag to filter command sets by for creating a new virtual operator job

Code Block
languageperl
push(@foundConditions,{
  message=>"Interface $interface has HIGH percentage of input errors.",
  ts_tag=>'interface_errors',
  condition => 1
});

...