Change frequency of properties in analysis

Hello
I have a lot of customs sites (100) with many analysis, all of them configured to report “every report”

is possible to change the frequency of all properties in analysis (site by site) from every report to every 6 hours using SQL script?

Thanks

This is not trivial, but I’d suggest that this would be best done via the REST API. More specifically, the PUT method against the /api/analysis/{site type}/{site name}/{analysis id} resource (see https://developer.bigfix.com/rest-api/api/analysis.html for reference, and https://developer.bigfix.com/rest-api/examples/update-analysis.html for an example).

You’ll first want to perform a GET of the given analysis to retrieve the existing XML definition, then modify the Property fields to include an EvaluationPeriod value, and PUT the modified XML.

Here’s an example XML with the EvaluationPeriod specifying 6 hours:

<?xml version="1.0" encoding="UTF-8"?> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"> <Analysis> <Title>Test Analysis</Title> <Description><![CDATA[my new description]]></Description> <Relevance>true</Relevance> <Source>Internal</Source> <SourceReleaseDate>2011-06-29</SourceReleaseDate> <MIMEField> <Name>x-fixlet-modification-time</Name> <Value>Mon, 12 Dec 2016 15:54:21 +0000</Value> </MIMEField> <Domain>BESC</Domain> <Property Name="Test" ID="1" EvaluationPeriod="PT6H">now</Property> </Analysis> </BES>

2 Likes

I’ve done @Aram’s recommendation and I think it’s the easiest way. Also it worth it to investigate the reason of why that content is set to report “every report”.