You are here

Returning all pages of results when using json_filter via opsview_rest

2 posts / 0 new
Last post
Quang Le
quang_1's picture
Returning all pages of results when using json_filter via opsview_rest

Hello,

I can get all the servicechecks in opsview by running the following;

/usr/local/nagios/bin/opsview_rest --username=admin --password=admin -pretty --data-format=json GET 'config/servicecheck?rows=all'

However, I cant get it to return all the rows when using the json_filter eg

/usr/local/nagios/bin/opsview_rest --username=admin --password=admin -pretty --data-format=json GET 'config/servicecheck?json_filter={"name":{ "-like" : "%25log check%25"}}'

Only returns page 1. 

  "summary" : {
      "allrows" : "718",
      "page" : "1",
      "rows" : "50",
      "totalpages" : "2",
      "totalrows" : "78"
   }

 

Is it possible to get all the rows when using the json_filter ? 

Duncan Ferguson
dferguson's picture
Just include 'rows=all' as a

Just include 'rows=all' as a parameter again:

... GET 'config/servicecheck?json_filter={"name":{ "-like" : "%25log%25"}}&rows=all'

  Duncs