Closed liluxdev closed 11 years ago
It's not possible as of now, but it is doable via a plugin and a custom check type.
I implemented this by subclassing the base class that the http and https types implement, and then having the http and https types proto off my new subclass. I check for content contains and content does not contain. Works well, as I didn't need full phantom.js support.
@askesian will your share your "fork" or your plugin here on github? I'm not yet a node.js programmer so I don't know how to code your hint!
@askesian interested in your solution, as I am working on something similar with a similar implementation. I'm looking to extract information from the polled http web service. This is an api that can supply information, and I'm looking to add that information to the check object. It's buggy right now but I think I'm close.. maybe I could learn something from your approach as well.. I'd be interested in seeing your fork ;)
My fork isn't up to date yet, but when I have time to fix the bug I'm facing I will push up my changes.
It works, but it's not really where I want to be just yet so no pull request possible until it's a feature you can turn off, or make into a plugin. (See todo's in my last commit). If you are interested in taking a look at this branch, it's on my fork: https://github.com/brettswift/uptime/tree/statusCheck
It is currently hard-coded to expect xml coming back from the http plugin to look like this:
I want to make the xpath / JSONPath configurable, and create a custom poller. Both of which I plan to do shortly.
@fzaninotto Thoughts? Is this something you would want eventually, if I get around to doing it right?
Seems duplicated after I post at #150 . Maybe my work may help you: https://github.com/jimyhuang/uptime/commit/e00e3ca2a17fc3c9c1a124763067a7de9cd373da
Sorry - just saw all of these messages. My bad. Ill post my code tomorrow. I didn't fork, I just made changes locally. Either way, I'll get it posted.
It's possible to develop a plugin who makes you able to set a string/regexp for each check entry to match against the response html text?
Eg. a site is ok if contains a footer string or an html comment used to tracking that all is ok
This feature request is inspirated by the availablity of such feature in pingdom checks (advanced settings)