Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management

Reply
Highlighted

Report output and policy_status/compliance_results processed in Perl API NetMRI

Techie
Posts: 12
2222     0

Hello,

 

i will get a list of Devices which not match with the config with a Policy Rule !

I will  process the output in perl.

 

Can i get the Information with a Report output function (module) in Perl ?

And or is there a function (module) directly to the policy_status/compliance_results ?

 

Both is intrestet to get Information !

 

I can't find a module in the docu "Perl API Index". -> NetMRI::API

 

 

Name:			Policy Compliance ERROR
Data Type:		Device Policy Rule Status
Gallery Category:	Compliance
Description:	
Filter:	Logic: 1
		1: Device Policy Rule Status: Status matches error
Display Columns:	
	Device: Name
	Device Policy Rule Status: Rule Name
	Device Policy Rule Status: Message
Sort By Columns:	
	Device Policy Rule Status: Rule Name (Ascending)

The XML Export:

 

<?xml version="1.0" encoding="UTF-8"?>
-<report>
<category-id type="integer">4</category-id>
<description/>
<hidden-ind type="boolean">false</hidden-ind>
<name>Policy Compliance ERROR</name>
<pre-packaged-ind type="boolean">false</pre-packaged-ind>
<short-headings-ind type="boolean">false</short-headings-ind>
-<report-sets type="array">
-<report-set>
<description/>
<logic-text>1</logic-text>
<logic-type>and</logic-type>
<model-doc-id type="integer">64</model-doc-id>
<name>Policy Compliance ERROR</name>
-<report-set-attributes type="array">
-<report-set-attribute>
<attribute-doc-id type="integer">2510</attribute-doc-id>
<is-display-column type="boolean">true</is-display-column>
<path>device.DeviceName</path>
<position type="integer">0</position>
<sort-direction nil="true"/>
</report-set-attribute>
-<report-set-attribute>
<attribute-doc-id type="integer">4148</attribute-doc-id>
<is-display-column type="boolean">false</is-display-column>
<path>policy_rule_name</path>
<position type="integer">0</position>
<sort-direction>ASC</sort-direction>
</report-set-attribute>
-<report-set-attribute>
<attribute-doc-id type="integer">4148</attribute-doc-id>
<is-display-column type="boolean">true</is-display-column>
<path>policy_rule_name</path>
<position type="integer">1</position>
<sort-direction nil="true"/>
</report-set-attribute>
-<report-set-attribute>
<attribute-doc-id type="integer">1445</attribute-doc-id>
<is-display-column type="boolean">true</is-display-column>
<path>PolicyRuleMessage</path>
<position type="integer">2</position>
<sort-direction nil="true"/>
</report-set-attribute>
</report-set-attributes>
-<report-set-filters type="array">
-<report-set-filter>
<attribute-doc-id type="integer">1444</attribute-doc-id>
<match>error</match>
<operator>matches</operator>
<path>PolicyRuleStatus</path>
<position type="integer">1</position>
</report-set-filter>
</report-set-filters>
</report-set>
</report-sets>
</report>

 

 

Highlighted

Re: Report output and policy_status/compliance_results processed in Perl API NetMRI

Techie
Posts: 24
2222     0

Hoppem,

 

Here is the answer I got back from TAC:

As per the Perl API documentation  below Perl API calls should help, specifically DevicePolicy and DeviceGroupPolicy will help with Policy Compliance result of an individual Device or for a Device Group.

 

NetMRI::API::Broker:Smiley Very HappyeviceGroupPolicy

NetMRI::API::Broker:Smiley Very HappyevicePolicy

NetMRI::API::Broker:Smiley Very HappyevicePolicyRule

NetMRI::API::Broker::EffectivePolicy

NetMRI::API::Broker::EffectivePolicyRule

 

You may need to run multiple module to invoke the full details of a policy and get the results against a specific device or device groups.

 

Also would like to know if your query is related to having a single perl module to run a policy compliance report? if yes, I believe we might be able to run the canned  Policy Compliance Report i.e. "'Policy Compliance Details" and "Policy Compliance Summary" using Perl API

 

NetMRI::API::Broker::ReportJobSpecification

NetMRI::API::Broker::ReportJobRun

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You