• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • sitemonitor-plugin
    • None

      I've made changes to the sitemonitor plugin to add support for verifying that a given string exists in the target URL, and the ability to specify basic cookies for a target URL as well. I didn't want to commit the changes without running 'em by you first, so they're attached to this issue in a diff file.

          [JENKINS-6359] Add functionality to sitemonitor plugin

          Andrew Bayer created issue -

          cliffano added a comment -

          Patch looks ok. I was planning to use apache commons httpclient, so thanks for including it in the patch. The string check also works fine.

          The only problem I found during testing was:

          • created a new job
          • configured, added one URL for SiteMonitor
          • saved the job
          • ran the job
          • found 2 additional sites with empty URLs in the Site Monitor report page
          • found additional results for those 2 additional sites in the console output
            java.lang.IllegalArgumentException: host parameter is null - host parameter is null
            URL: , response code: null, status: EXCEPTION
            java.lang.IllegalArgumentException: host parameter is null - host parameter is null
            URL: , response code: null, status: EXCEPTION
          • went back to the job configuration page and found 2 additional sites with empty URL

          I also tested this by creating a new job, configure and add a URL to monitor, save configuration, then returned to configuration page, it already had 2 extra sites with empty URLs.

          I found this problem on both freestyle and Maven jobs, by running directly using mvn hpi:run, and also by installing the hpi file on my Hudson instance.

          Any idea what could possibly add those 2 extra sites?

          cliffano added a comment - Patch looks ok. I was planning to use apache commons httpclient, so thanks for including it in the patch. The string check also works fine. The only problem I found during testing was: created a new job configured, added one URL for SiteMonitor saved the job ran the job found 2 additional sites with empty URLs in the Site Monitor report page found additional results for those 2 additional sites in the console output java.lang.IllegalArgumentException: host parameter is null - host parameter is null URL: , response code: null, status: EXCEPTION java.lang.IllegalArgumentException: host parameter is null - host parameter is null URL: , response code: null, status: EXCEPTION went back to the job configuration page and found 2 additional sites with empty URL I also tested this by creating a new job, configure and add a URL to monitor, save configuration, then returned to configuration page, it already had 2 extra sites with empty URLs. I found this problem on both freestyle and Maven jobs, by running directly using mvn hpi:run, and also by installing the hpi file on my Hudson instance. Any idea what could possibly add those 2 extra sites?
          cliffano made changes -
          Assignee Original: cliffano [ cliffano ] New: Andrew Bayer [ abayer ]
          Jacob Robertson made changes -
          Component/s New: sitemonitor [ 15777 ]
          Component/s Original: other [ 15490 ]

          I know what was causing the 2 extra sites. It's the way the code handles the json. I didn't see this issue because it wasn't previously assigned to the component. I've created a fork in git that adds some regex behavior. But, I didn't add the cookie behavior, which would actually be really great. See

          https://github.com/jacobrobertson/sitemonitor-plugin

          Jacob Robertson added a comment - I know what was causing the 2 extra sites. It's the way the code handles the json. I didn't see this issue because it wasn't previously assigned to the component. I've created a fork in git that adds some regex behavior. But, I didn't add the cookie behavior, which would actually be really great. See https://github.com/jacobrobertson/sitemonitor-plugin

          Jacob Robertson added a comment - See https://github.com/jenkinsci/sitemonitor-plugin/pull/1
          Jacob Robertson made changes -
          Assignee Original: Andrew Bayer [ abayer ] New: cliffano [ cliffano ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 136454 ] New: JNJira + In-Review [ 174504 ]

            cliffano cliffano
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: