Starting Situation
- In a number of situations use of the JOC Cockpit GUI is not applicable, e.g. when automating tasks.
- This includes e.g.
- to check if a Master is up and running or if it is down.
- to identify the active Master in a passive cluster.
Use Cases
Identify the Active Master in a Passive Cluster
PS > Connect-JS -Url http://localhost:4446 -AskForCredentials -Id some-jobscheduler-id
PS > Get-JSMasterCluster -Active
clusterType : @{_type=PASSIVE; precedence=0}
host : apmacwin
jobschedulerId : apmacwin_4444
port : 40444
startedAt : 06.08.2020 06:19:45
state : @{_text=RUNNING; severity=0}
surveyDate : 10.08.2020 17:05:22
url : http://apmacwin:40444
Explanations:
- Line 1: The Connect-JS cmdlet connects to JOC Cockpit at the given URL and pre-selects the Master cluster specified with the value of the
-Idparameter. - Line 2: The Get-JSMasterCluster cmdlet is used with the
-Activeparameter to return the currently active instance only. The result object includes information such as the URL and state of the active Master.