How To View JSON value of UserActivityCount, jobCurrentQueueSize, jobEnginesCount With PowerShell & Curl
In this post, I’ll share how to set up and extract a set of Json values in Ambience 4.x.
This will help identify if the job engines are running at full capacity or if they are down.
In this example, we are using IP Address of the host that is running Ambience 4.x to demonstrate how the script monitors the health of the job engines.
It loops indefinitely. It is only monitoring the value of the job engines.
Step 1: Fill The Parameters Accordingly
-
Seconds here refer to the number of seconds it is monitoring the health of the job engines.
-
Replace localhost with the IP Address of the machine you are running this script if you don’t have access to the server running Ambience.
$ip_addr = “192.168.1.103”
$port = “8080”
$seconds = 10
Step 2: Do This If Your Environment Disable PS1 From Executing
-
Open PowerShell ISE. Open the script.
-
Press F5 when you had made the necessary changes.
Step 3: Run The Following Commands Using CURL
- curl http://[hostname]:[port number]/elx/do/eno/co/query/system-status
Remember to replace the domain name ‘eno’ with the domain name in your Ambience Server licence, if required.
Rename the file to ps1 if your workspace allows PowerShell scripts to run.
fetch_json.txt (2.3 KB)