-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[O11y][Prometheus Input] Add system test cases (#6490)
* add system test case * update changelog * update system tests
- Loading branch information
Showing
10 changed files
with
129 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/prometheus_input/_dev/deploy/docker/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '2.3' | ||
services: | ||
prometheus_input: | ||
image: ibmcom/websphere-traditional:9.0.5.11 | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9080/metrics"] | ||
interval: 30s | ||
timeout: 30s | ||
retries: 20 | ||
ports: | ||
- 9080 | ||
volumes: | ||
- ./files/PASSWORD:/tmp/PASSWORD | ||
- ./files/init.jython:/home/scripts/init.jython | ||
- ./files/start_server.sh:/work/start_server.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Welcome1 |
7 changes: 7 additions & 0 deletions
7
packages/prometheus_input/_dev/deploy/docker/files/init.jython
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
print("Starting metrics") | ||
perfName=AdminControl.completeObjectName('type=Perf,*') | ||
AdminControl.invoke(perfName,'setStatisticSet','all') | ||
AdminApp.install('/opt/IBM/WebSphere/AppServer/installableApps/metrics.ear', '[-node DefaultNode01 -cell DefaultCell01 -server server1]') | ||
AdminConfig.save() | ||
AdminControl.invoke('WebSphere:name=ApplicationManager,process=server1,platform=proxy,node=DefaultNode01,version=9.0.5.11,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=DefaultCell01,spec=1.0', 'startApplication', '[MetricsApp]') | ||
print("Metrics started") |
8 changes: 8 additions & 0 deletions
8
packages/prometheus_input/_dev/deploy/docker/files/start_server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
PROFILE_NAME=${PROFILE_NAME:-"AppSrv01"} | ||
SERVER_NAME=${SERVER_NAME:-"server1"} | ||
/work/set_password.sh | ||
echo "Starting server ..................." | ||
/opt/IBM/WebSphere/AppServer/profiles/$PROFILE_NAME/bin/startServer.sh $SERVER_NAME | ||
wsadmin.sh -lang jython -user wsadmin -password Welcome1 -f /home/scripts/init.jython | ||
tail -f dev/null |
4 changes: 4 additions & 0 deletions
4
packages/prometheus_input/_dev/test/system/test-default-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vars: | ||
hosts: | ||
- http://{{Hostname}}:{{Port}} | ||
data_stream.dataset: prometheus_input.prometheus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: ecs.version | ||
external: ecs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"@timestamp": "2023-06-30T11:56:37.693Z", | ||
"agent": { | ||
"ephemeral_id": "4f603ef5-6900-4369-b593-3fed11799f03", | ||
"id": "8b818229-d30a-4276-b8dc-1771302ac16c", | ||
"name": "docker-fleet-agent", | ||
"type": "metricbeat", | ||
"version": "8.8.0" | ||
}, | ||
"data_stream": { | ||
"dataset": "prometheus_input.prometheus", | ||
"namespace": "ep", | ||
"type": "metrics" | ||
}, | ||
"ecs": { | ||
"version": "8.0.0" | ||
}, | ||
"elastic_agent": { | ||
"id": "8b818229-d30a-4276-b8dc-1771302ac16c", | ||
"snapshot": false, | ||
"version": "8.8.0" | ||
}, | ||
"event": { | ||
"agent_id_status": "verified", | ||
"dataset": "prometheus_input.prometheus", | ||
"duration": 65732205, | ||
"ingested": "2023-06-30T11:56:38Z", | ||
"module": "prometheus" | ||
}, | ||
"host": { | ||
"architecture": "x86_64", | ||
"containerized": true, | ||
"hostname": "docker-fleet-agent", | ||
"id": "e8978f2086c14e13b7a0af9ed0011d19", | ||
"ip": [ | ||
"192.168.245.7" | ||
], | ||
"mac": [ | ||
"02-42-C0-A8-F5-07" | ||
], | ||
"name": "docker-fleet-agent", | ||
"os": { | ||
"codename": "focal", | ||
"family": "debian", | ||
"kernel": "3.10.0-1160.88.1.el7.x86_64", | ||
"name": "Ubuntu", | ||
"platform": "ubuntu", | ||
"type": "linux", | ||
"version": "20.04.6 LTS (Focal Fossa)" | ||
} | ||
}, | ||
"metricset": { | ||
"name": "collector", | ||
"period": 10000 | ||
}, | ||
"prometheus": { | ||
"labels": { | ||
"instance": "elastic-package-service_prometheus_input_1:9080", | ||
"job": "prometheus", | ||
"objectpool": "ObjectPool_ibm.system.objectpool_com.ibm.ws.asynchbeans.CJWorkListenerRunnable" | ||
}, | ||
"was_objectpool_allocate_total": { | ||
"counter": 0, | ||
"rate": 0 | ||
}, | ||
"was_objectpool_create_total": { | ||
"counter": 0, | ||
"rate": 0 | ||
}, | ||
"was_objectpool_idle_objects": { | ||
"value": 0 | ||
}, | ||
"was_objectpool_return_total": { | ||
"counter": 0, | ||
"rate": 0 | ||
} | ||
}, | ||
"service": { | ||
"address": "http://elastic-package-service_prometheus_input_1:9080/metrics", | ||
"type": "prometheus" | ||
} | ||
} |