Ok... here is the script part.
http://www.box.net/shared/ypok129f7y

Don't forget to add the folder of check_http to your Linux PATH and also the 
script I did in your path (or do an ln -s /path/to/check_http /usr/bin/ and ln 
-s /path/to/RestMonitor.sh /usr/bin). Also make the script executable (chmod +x 
RestMonitor.sh)

The script:
- outputs like : http_code=200;time=0.15342 (so you can graph HTTP response 
codes,response_times and set min/max threasholds to send alerts on that values)
- catches Warnings,Errors and generate errors that should appear in Zenoss:
For instance, if you say to the check_http command that you wan't to check if 
the content contains the regex "BLABLABLA" (check_http ... -R "BLABLABLA") you 
will get an error generated in Zenoss with a label "Invalid Response regex 
BLABLABLA not found".

In ZenOss for the DataSource enter:
type= command
command = 
RestMonitor.sh mysite.com 8080 /path/to/ressource.php
or if you want to check the regex BLABLABLA in the response content 
RestMonitor.sh mysite.com 8080 /path/to/ressource.php BLABLABLA
As I said it will generate an alert in ZenOss if BLABLABLA does not appear in 
response content)

In ZenOss DataSources, create a DataPoint named:
- "http_code" if you want to set threasholds and/or graph response code
- "time" if you want to set threasholds and/or graph response time

------------------------
 unset




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=6501#6501

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to