Hi all,

we're doing periodic database reloads from external sources and I'm trying to figure out how to monitor for errors. E.g. I'd run a query '?q=FOO:BAR&rows=0' and check if "numFound" > 0, that'd tell me if the reload succeeded.

The check is done using nagios curl plugin, and while it can match a string in the response, the "> 0" check would require writing an extra parser -- it's a simple enough two-liner, but I'd rather not add more moving pieces if I can help it.

The best I can figure so far is
```
fl=result:if(gt(docfreq(FOO,BAR),0)"YES","NO")&rows=1
```
-- returns '"result":"NO"' that our nagios plugin can look for.

Is there a better/simpler way?

TIA
Dima

Reply via email to