Made some slight progress. This returns the availability as expected, but
I'm not sure what time frame it is using.....

https://mysite/check_mk/view.py?_username=myuser&_secret=mysecretcode&;
<https://mysite/check_mk/view.py?_username=myuser&_secret=mysecretcode&aggr_name=App1&mode=availability&output_format=json&selection=5e49f056-7269-46bb-bc16-4055a45a934c&view_name=aggr_single>
aggr_group=&aggr_host_host=&aggr_host_site=&aggr_name_regex=&aggr_output=&bias-1=on&bias0=on&bias1=on&bias2=on&bias3=on&biasn=on&bies-1=on&bies0=on&bies1=on&bies2=on&bies3=on&birs-1=on&birs0=on&birs1=on&birs2=on&birs3=on&mode=availability&output_format=csv_export&selection=56c984dd-d158-4424-b77e-af05e551d5e8&view_name=aggr_all"


Aggregate;OK;WARN;CRIT;UNKNOWN;Downtime
App1;100.00%;0.00%;0.00%;0.00%;0.00%
App2;100.00%;0.00%;0.00%;0.00%;0.00%
App3;100.00%;0.00%;0.00%;0.00%;0.00%
App4;0.00%;100.00%;0.00%;0.00%;0.00%



On Thu, May 17, 2018 at 12:08 PM, Paul <paulmonitor...@gmail.com> wrote:

> Hi all,
>
> Is anyone able to get BI Availability metrics using the Automation user? I
> am seeing a couple problems when using the default selections in the report
> criteria.
>
> Here is how I am constructing the request;
>
> Navigate to BI Aggregations and click availability. Right click and copy
> the URI from the 'Export to CSV'. Modify slightly to include the API
> username/secret.
>
> The actual request looks like:
> https://mysite/check_mk/view.py?_username=myuser&_secret=
> mysecretcode&aggr_name=App1&mode=availability&output_
> format=json&selection=5e49f056-7269-46bb-bc16-4055a45a934c&view_name=aggr_
> single
>
> Returns an error about max recursion reached.
>
> If I modify the default report criteria, my URI is more verbose and the
> query returns. correctly.
>
> https://mysite/check_mk/view.py?_username=myuser&_secret=
> mysecretcode&aggr_name=App1 aggr_group=Production&aggr_
> host_host=&aggr_host_site=&aggr_name_regex=&aggr_output=&
> apply=Apply&avo_av_filter_outages_p_crit=0.0&avo_av_
> filter_outages_p_non-ok=0.0&avo_av_filter_outages_p_warn=
> 0.0&avo_av_levels_value_0=99.000&avo_av_levels_value_1=95.
> 000&avo_consider_p_flapping=on&avo_consider_p_host_down=
> on&avo_consider_p_unmonitored=on&avo_dateformat=0&avo_
> downtimes_p_include=0&avo_grouping=0&avo_host_state_
> grouping_p_unreach=2&avo_labelling=1&avo_logrow_limit=
> 10000&avo_notification_period=2&avo_outage_statistics_0=1&
> avo_outage_statistics_1=1&avo_rangespec_13_days=0&avo_
> rangespec_13_hours=0&avo_rangespec_13_minutes=0&avo_
> rangespec_13_seconds=0&avo_rangespec_14_0_day=16&avo_
> rangespec_14_0_month=5&avo_rangespec_14_0_year=2018&avo_
> rangespec_14_1_day=16&avo_rangespec_14_1_month=5&avo_
> rangespec_14_1_year=2018&avo_rangespec_sel=0&avo_service_
> period=0&avo_short_intervals=0&avo_state_grouping_p_host_
> down=4&avo_state_grouping_p_unknown=3&avo_state_grouping_
> p_warn=1&avo_summary=1&avo_timeformat_0=1&avo_timeformat_
> 1=2&avo_timeformat_2=0&avo_timelimit_days=0&avo_timelimit_hours=0&avo_
> timelimit_minutes=0&avo_timelimit_seconds=30&
> avoptions=set&bias-1=on&bias0=on&bias1=on&bias2=on&bias3=on&
> biasn=on&bies-1=on&bies0=on&bies1=on&bies2=on&bies3=on&
> birs-1=on&birs0=on&birs1=on&birs2=on&birs3=on&filled_in=
> avoptions&mode=availability&output_format=csv_export&
> selection=ebdb0acd-ef61-41b7-bd83-43cea816da89&view_name=aggr_group"
>
> My question is, how are others doing this? Are you obtaining current
> dates/times and inserting them in your query before executing? I am looking
> to execute the GET every 4 hours, based on the the last 4 hours of
> metrics/availability.
>
> Paul
>
>
>
>
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to