This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
DonForigua
Posts: 94 Joined: Thu Oct 07, 2021 8:59 pm
Post
by DonForigua » Thu Feb 10, 2022 11:40 am
Hello
When i run a power quiery:
In excel or power bi
Data > Web origin
Code: Select all
= Json.Document(Web.Contents("https://XXXXXXX/nagiosxi/api/v1/objects/hostavailability?apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&starttime="&Number.ToText(starttimeDC)&"&endtime="&Number.ToText(endtimeDC)&""))
Where starttimeDC an endtimeDC are parameters
understanding that powerquery you do not provide any support, but when i do this query the operative system create many proccess called avail.cgi
Here part of my php.ini
Code: Select all
max_execution_time = 1920
max_input_time = 4800
max_input_vars = 20000000
memory_limit = 4096M
You do not have the required permissions to view the files attached to this post.
DonForigua
Posts: 94 Joined: Thu Oct 07, 2021 8:59 pm
Post
by DonForigua » Thu Feb 10, 2022 11:48 am
Here a exit from apache log
Code: Select all
[10/Feb/2022:11:40:37 -0500] 186.29.20.47 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /nagiosxi/api/v1/objects/hostavailability?apikey=XXXXXXXXXXXXXXXXXXXX&starttime=1640995200&endtime=1643673600 HTTP/1.1" 1370866
[10/Feb/2022:11:40:34 -0500] 186.29.20.47 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /nagiosxi/api/v1/objects/hostavailability?apikey=XXXXXXXXXXXXXXXXXXXXg&starttime=1640995200&endtime=1643673600 HTTP/1.1" 1370866
[10/Feb/2022:11:42:19 -0500] 186.29.20.47 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /nagiosxi/api/v1/objects/hostavailability?apikey=XXXXXXXXXXXXXXXXXXXX&starttime=1640995200&endtime=1643673600 HTTP/1.1" 1370866
[10/Feb/2022:11:42:16 -0500] 186.29.20.47 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /nagiosxi/api/v1/objects/hostavailability?apikey=XXXXXXXXXXXXXXXXXXXX&starttime=1640995200&endtime=1643673600 HTTP/1.1" 1370866
it seems as made the result on an infinete loop, could it be a bug?
gsmith
Posts: 1253 Joined: Tue Mar 02, 2021 11:15 am
Post
by gsmith » Thu Feb 10, 2022 12:49 pm
HI,
The machine 186.29.20.47 is making the same request to the Nagios API over and over. Each time Nagios receives that
request it creates a process to provide that information.
Thanks
DonForigua
Posts: 94 Joined: Thu Oct 07, 2021 8:59 pm
Post
by DonForigua » Thu Feb 10, 2022 10:18 pm
Hello
It is my machine y and i only run the power query
gsmith
Posts: 1253 Joined: Tue Mar 02, 2021 11:15 am
Post
by gsmith » Sun Feb 13, 2022 9:52 am
Hi
I am not sure how power query works, but it looks like "power query" is what is in a loop, as it keeps
sending requests to the Nagios api as shown by the Nagios logs. Does "power query" have some settings
like a timeout before sending another query? My guess is that the initial query is not responding fast enough
and so "power query" sends another request.
It looks like you are requesting a months worth of data based on those time stamps. Could you
try running your query via the curl command in a CLI and see how long it takes?
Thanks