Live data from Hacker News

Monitors.txt - lazy webapp monitoring

monitorstxt.org

21–30 of 83 posts

Re: Monitors.txt - lazy webapp monitoring

#22
post #16

So far people seem to like the idea, but not so keen on cucumber for the language. Please contribute any pseudo code ideas below as I want to get this right

Something Javascript-based might work. Perhaps the site-wanting-monitoring supplies a collection of JS scripts to run, each of which will be provided a standard object providing assertions/conclusions/reporting about specific features/URLs/scenarios.

Wouldn't sending raw Javascript upstream limit adoption due to the increased burden of securing the provider against malicious or buggy scripts? For this use case, a declarative solution seems like a requirement.

Re: Monitors.txt - lazy webapp monitoring

#24
post #16

Earlier quoted context omitted.

Something Javascript-based might work. Perhaps the site-wanting-monitoring supplies a collection of JS scripts to run, each of which will be provided a standard object providing assertions/conclusions/reporting about specific features/URLs/scenarios.

Wouldn't sending raw Javascript upstream limit adoption due to the increased burden of securing the provider against malicious or buggy scripts? For this use case, a declarative solution seems like a requirement.

It's a burden, sure, but is the burden that large? Accepting and sandboxing remote Javascript seems relatively well understood, with lots of open reusable code already available. And perhaps the burden is offset by the familiarity and flexibility.

Re: Monitors.txt - lazy webapp monitoring

#26

Really love the idea of text file based monitoring, hate the cucumber interface. I stomach it in rails but I'm not a big fan of English in my code

I'm curious about this -- don't you use APIs which use largely, if not universally, English identifiers? Or is there a version of, say, the .NET Framework where the API itself is written in French, German, or Spanish? Or what language has a custom parser for each language so that you can write keywords ("if", "for", " do ") in your native language?

Believe it or not, VisualBasic (and every built in function) in Excel is translated in localized versions, and of course the English keywords are not kept. It's a mess.

Re: Monitors.txt - lazy webapp monitoring

#28

Really love the idea of text file based monitoring, hate the cucumber interface. I stomach it in rails but I'm not a big fan of English in my code

I'm curious about this -- don't you use APIs which use largely, if not universally, English identifiers? Or is there a version of, say, the .NET Framework where the API itself is written in French, German, or Spanish? Or what language has a custom parser for each language so that you can write keywords ("if", "for", " do ") in your native language?

He means of "English, the natural language", dummy.

Re: Monitors.txt - lazy webapp monitoring

#29
post #23

I like this! I wish there was a way to authenticate though. So, as you can gauge in deeper and check if services are really working. But of course, if the file is public, that throws spanner in the plans.

Talking about monitoring deeper in the app...Monitoring cron jobs is one thing that I've never done in a way I'm comfortable with, or enough. That realization is what lead to monitors.txt. I'm working on something like this along with a rails plugin for checking jobs run on time:

  Feature: Jobs should run on time

    Scenario: Search Subscription Job ran on time
      Given the job started and ended at:
        | start                   | end                     |
        | 2011-10-30 05:30:01 GMT | 2011-10-30 05:37:42 GMT |
        | 2011-10-29 05:30:01 GMT | 2011-10-29 05:37:42 GMT |
      Then I should see the job took less than 10 minutes
      And I should see the job started every day at "05:30 GMT"
The rails plugin generates the text above and start/end run times with something like this:

  class SearchSubscriptionJob

    def perform
      # Fire off the search subscription emails
      ...
    end

    add_job_monitor :job_method => :perform, 
      :should_run => [:daily, "05:30 GMT"],
      :max_duration => 10.minutes,
      :alerts => {:email => 'admin@yoursite.tld',
                  :sms => '+441234567890',
                  :twitter => 'twitteruser'}

Re: Monitors.txt - lazy webapp monitoring

#30

Interesting idea, I'm not so sure I agree about "For the more gung-ho, obfuscate the URL and use SSL (e.g. https://yoursite.tld/something-unguessable/monitors.txt ) and tell your provider where to find your monitors.txt'. http://en.wikipedia.org/wiki/Security_through_obscurity

That's why I added "gung-ho"
Post reply on HN