Navigation

    Best APM Solution for Oracle WebLogic Server & FMW Product Family
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Download

    Oracle WebLogic Remote/Outbound URL Monitoring

    L2 Monitoring & Automation
    1
    1
    152
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wlsdmsupport
      WLSDM Support last edited by fevzi.korkutata-wlsdmteam

      OHS Health/Webpage URL monitoring is quite simple to create then take action when instance/URL:port performance exceeds the threshold. The DevOps MBean consists of the following file parts: WLSDM-LinuxURLPortMonitoring.sh, WLSDM-URLProperties, WLSDM-Health.sh and WLSDM-WebServer.conf.

      DevOps MBean Script:

      OHS Health/Webpage URL Monitoring. Support multiple URL monitoring.

      #Author: Fevzi Korkutata
      rootpath=/data/webadmin/volthread/scripts/wlsdm.monitoring/curl.health
      
      propertiesfile=$rootpath/urls.properties
      
      while IFS='=' read -r hostname url;do
              
              resp=$(curl --max-time 10 -s -w %{time_total}\\n -o /dev/null $url)
              awk "BEGIN {printf \"$hostname=%s\\n\", int($resp*1000)}"
      
      done < $propertiesfile
      

      urls.properties file:

      TEST_LB_80=http://127.0.0.1/health
      TEST_WEB1_7777=http://127.0.0.2:7777/health
      TEST_WEB2_7777=http://127.0.0.3:7777/health
      

      healthsh file: for http://{IP}:{OHS-PORT}/health

      #Author: Fevzi Korkutata
      #!/bin/sh
      echo Content-type: text/html
      echo
      printf "<html>\n";
      printf "<head>\n";
      printf "<title>OHS Health Check</title>\n";
      printf "</head>\n";
      printf "<body>\n";
      printf "<h3>Hi!</h3>\n";
      printf "<p>OHS WebServer HealthCheck Application</p>\n";
      printf "<p><b>_date:</b> $(date)</p>\n";
      printf "<p><b>_rand01:</b> $(od -N 12 -t uL -An /dev/urandom | tr -d " ")</p>\n";
      printf "</body>\n";
      printf "</html>\n";
      

      Apache or OHS Configuration:

      #Author: Fevzi Korkutata
      <Directory "/">
       AllowOverride None
       Require all granted
       Options +ExecCGI
       AddHandler cgi-script .sh
      </Directory>Options +MultiViews
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{DOCUMENT_ROOT}/$1\.html -f [NC]
      RewriteRule ^(.+?)/?$ /$1.html [L]RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{DOCUMENT_ROOT}/$1\.sh -f [NC]
      RewriteRule ^(.+?)/?$ /$1.sh [L]
      

      WLSDM Chart Output:

      18a5aaa0-b68f-4f71-a86f-d2f33a09103c-image.png


      Author: Fevzi Korkutata

      WLSDM Community Support Team

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post

      WLSDM: Native WebLogic Monitoring & Diagnostics

      Copyright © 2021 WLSDM Community & Support Portal | WLSDM.COM | WLSDM Blog