Skip to main content
12-Amethyst
August 24, 2022
Solved

Windchill System status page monitoring utility/script that records/emails response time and outages

  • August 24, 2022
  • 1 reply
  • 3277 views

Hi,

 

Can anyone recommend a simple monitoring utility to check the response time and availability of various Windchill status URL's with an ability to email Admin's when there are outages of the various sub-systems?

 

Apache check:      https://servername/Windchill\wtcore\test\staticAnon.html

Tomcat check:      https://servername/Windchill\wtcore\test\dynAnon.jsp

Windchill check:   https://servername/Windchill/servlet/ProwtGW

 

Does anyone have anything like this already or willing to suggest a suitable (simple script) monitoring utility?

 

Thanks

Gary

Best answer by GaryMansell

Thanks for replying - i was specifically wanting to avoid installing anything, just a quick and dirty (script) solution.

 

In the end, I put this Powershell script together. It does not do all I want it to do (no email), but is good enough for now.

 

I have set it up to run from servers located at all our remote sites to our Windchill Server and, every 15 seconds, it first checks that the Windchill Server Tomcat is responding. If not, then it then goes on to check Apache and, if not, then it tests the network connection to the Windchill server, and if not, it tests the network connection to our two site router IPs (to see if VPN link is down). It logs any issues to a logfile with dates/times. Gives me a quick clue as to outage causes from all our remote sites.

 

Here it is if it is useful to anyone:

 
$server="windchill.company.com"
$router1="xxx.xxx.xxx.xxx"
$router2="xxx.xxx.xxx.xxx"
$timeout=1
$logfile="C:\Temp\WindchillServerTest.log"

while($true) {
    try {
    Invoke-WebRequest -Uri https://$server/Windchill/wtcore/test/dynAnon.jsp -TimeoutSec $timeout | Out-Null
    } catch {
        "$(Get-Date -format 'u') - Windchill Tomcat Server is not responding" | Out-File -FilePath $logfile -Append
        try {  
            Invoke-WebRequest -Uri https://$server -TimeoutSec $timeout | Out-Null
            "$(Get-Date -format 'u') - Windchill Apache Server is responding" | Out-File -FilePath $logfile -Append
        } catch {
                "$(Get-Date -format 'u') - Windchill Apache Server is not responding" | Out-File -FilePath $logfile -Append    
                if ((Test-Connection -ComputerName $server -Quiet -Count 1) -ne $true ) {
                    "$(Get-Date -format 'u') - Windchill Host Server is not responding" | Out-File -FilePath $logfile -Append

                    if ((Test-Connection -ComputerName $router1 -Quiet -Count 1) -ne $true ) {
                        "$(Get-Date -format 'u') - Router 1 is not responding" | Out-File -FilePath $logfile -Append
                    } else {
                        "$(Get-Date -format 'u') - Router 1 is responding" | Out-File -FilePath $logfile -Append
                    }
                    if ((Test-Connection -ComputerName $router1 -Quiet -Count 1) -ne $true ) {
                        "$(Get-Date -format 'u') - Router 2 is not responding" | Out-File -FilePath $logfile -Append
                    } else {
                        "$(Get-Date -format 'u') - Router 2 is responding" | Out-File -FilePath $logfile -Append
                    }
                } else {
                    "$(Get-Date -format 'u') - Windchill Host Server is responding" | Out-File -FilePath $logfile -Append
                }
        }
    "**********************************************************************" | Out-File -FilePath $logfile -Append
    }
Start-Sleep 15
}

 

 

1 reply

avillanueva
23-Emerald I
23-Emerald I
August 25, 2022

I do not have scripts but try https://www.nagios.org/

 

GaryMansell12-AmethystAuthorAnswer
12-Amethyst
August 25, 2022

Thanks for replying - i was specifically wanting to avoid installing anything, just a quick and dirty (script) solution.

 

In the end, I put this Powershell script together. It does not do all I want it to do (no email), but is good enough for now.

 

I have set it up to run from servers located at all our remote sites to our Windchill Server and, every 15 seconds, it first checks that the Windchill Server Tomcat is responding. If not, then it then goes on to check Apache and, if not, then it tests the network connection to the Windchill server, and if not, it tests the network connection to our two site router IPs (to see if VPN link is down). It logs any issues to a logfile with dates/times. Gives me a quick clue as to outage causes from all our remote sites.

 

Here it is if it is useful to anyone:

 
$server="windchill.company.com"
$router1="xxx.xxx.xxx.xxx"
$router2="xxx.xxx.xxx.xxx"
$timeout=1
$logfile="C:\Temp\WindchillServerTest.log"

while($true) {
    try {
    Invoke-WebRequest -Uri https://$server/Windchill/wtcore/test/dynAnon.jsp -TimeoutSec $timeout | Out-Null
    } catch {
        "$(Get-Date -format 'u') - Windchill Tomcat Server is not responding" | Out-File -FilePath $logfile -Append
        try {  
            Invoke-WebRequest -Uri https://$server -TimeoutSec $timeout | Out-Null
            "$(Get-Date -format 'u') - Windchill Apache Server is responding" | Out-File -FilePath $logfile -Append
        } catch {
                "$(Get-Date -format 'u') - Windchill Apache Server is not responding" | Out-File -FilePath $logfile -Append    
                if ((Test-Connection -ComputerName $server -Quiet -Count 1) -ne $true ) {
                    "$(Get-Date -format 'u') - Windchill Host Server is not responding" | Out-File -FilePath $logfile -Append

                    if ((Test-Connection -ComputerName $router1 -Quiet -Count 1) -ne $true ) {
                        "$(Get-Date -format 'u') - Router 1 is not responding" | Out-File -FilePath $logfile -Append
                    } else {
                        "$(Get-Date -format 'u') - Router 1 is responding" | Out-File -FilePath $logfile -Append
                    }
                    if ((Test-Connection -ComputerName $router1 -Quiet -Count 1) -ne $true ) {
                        "$(Get-Date -format 'u') - Router 2 is not responding" | Out-File -FilePath $logfile -Append
                    } else {
                        "$(Get-Date -format 'u') - Router 2 is responding" | Out-File -FilePath $logfile -Append
                    }
                } else {
                    "$(Get-Date -format 'u') - Windchill Host Server is responding" | Out-File -FilePath $logfile -Append
                }
        }
    "**********************************************************************" | Out-File -FilePath $logfile -Append
    }
Start-Sleep 15
}

 

 

avillanueva
23-Emerald I
23-Emerald I
August 25, 2022