Results 1 to 4 of 4

Thread: Random selection of a URL (for sampling purposes)

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    9

    Random selection of a URL (for sampling purposes)

    Hi everybody

    I a newbie of Shinken. Very impressive and nive piece of work. Congratulations.

    I am looking for a way to provide a random URL to a check_http command. Is there a native way to do so ?

    Thank you in advance




  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    Re: Random selection of a URL (for sampling purposes)

    Hi
    I use some typical services, as "www.google.com" or my local domain authority web site ;D
    but always static..
    I think shinken or check_http will not do it
    bye

  3. #3
    Junior Member
    Join Date
    Oct 2012
    Posts
    9

    Re: Random selection of a URL (for sampling purposes)

    @denetariko. Thanks for your quick answer.

    So i was wondering how this could be done without breaking Shinken scalability.

    • [li]First (stupid) solution : via the receiver to change service configuration each 5 minutes.[/li]
      [li]The scheduler could be in charge of computing a dynamic URL to be provided to the Poller. Any ideas for that ? [/li]
      [li]The poller computes the dynamic URL. Any ideas for that ?[/li]


    I suppose each solution depends on the deployed distributed architecture.

    Thanks

  4. #4
    Senior Member
    Join Date
    Aug 2011
    Posts
    201

    Re: Random selection of a URL (for sampling purposes)

    I'm not an expert but I think you could probe to write a little script (bash, python,..) to do it..

    If you want active check (check is launched by shinken) you would write and launch every X time (cron) a script who reads a random line from one text file with a lot of URLs and then, using this random url, generates a bash file with "check_http -H $RANDOMURL$" or something like that.. Then, the generated bash would be used by a shinken command from commands.cfg... Using this you don't need to re-load config because shinken's check command is always the same...

    And using pasive checks, you could launch every X time same script, execute from it the check_http directly, collect the output and send to shinken...

    bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •