OpsPulse
by Cerivo
Observe
Command CenterAlerts & AuditTopology
IBM MQ
Queue HealthQueue ManagersInventory & Ownership
IBM ACE
Integration Servers
Platform
Servers (Linux/AIX)Certificates
Sandbox
Agents & PipelineChaos Lab
Modules · roadmap
Apache Kafkasoon
Tomcat / Libertysoon
IBM Db2soon
DataPowersoon
Sterling B2Bisoon
Simulated sandbox
Connecting… cerivotech.com
Exit sandbox
Live · …
Talk to us

Agents & Pipeline

How telemetry flows from Linux/AIX servers into OpsPulse — live

Live pipeline

Agents
–/– reporting
bash · ksh on RHEL/AIX
API Gateway
TLS · token auth
/api/v1/ingest
ingest-svc
0 payloads/min
0 B/min
Store
in-memory fallback
snapshots · events · audit
query-svc
alert rules engine
0 active alerts
OpsPulse UI
5s live refresh
last ingest —
1Collect

A lightweight shell agent (bash on RHEL, ksh93 on AIX) runs every 15–60s from cron or a systemd timer. It reads host metrics, runs runmqsc / mqsilist / runmqakm, and builds one JSON document. No Java, no daemons, nothing to patch.

2Ship

The agent POSTs over HTTPS to the API gateway with a per-environment token. If the network blips, the next run simply sends a fresh snapshot — no fragile queues on the box.

3Ingest

ingest-svc validates the payload, stamps it, upserts the latest snapshot per host and appends to the ingest log in Postgres.

4Evaluate

query-svc assembles the estate view and runs alert rules: queue depth ≥ 50/80%, missing consumers, DLQ messages, channel retrying/stopped, EG down or hot, cert ≤ 30/7 days, agent silent > 45s.

5Act

The UI, Pulse AI and (in production) ServiceNow / Teams / PagerDuty webhooks consume the same API. Admin actions are written to an audit table.

Ingest log

0 payloads/min · 0 B/min

Latest payload

Loading…

Agent scripts

#!/usr/bin/env bash
# opspulse-agent.sh — OpsPulse collector for RHEL / Linux (IBM MQ + IBM ACE)
# Schedule:  * * * * * /opt/opspulse/opspulse-agent.sh   (or a systemd timer every 15s)
# Requires:  bash 4+, curl, mqm/mqbrkrs group membership for runmqsc / mqsilist
set -euo pipefail

API_URL="${OPSPULSE_URL:-https://your-opspulse.example.com/api/v1/ingest}"
TOKEN="${OPSPULSE_TOKEN:?set OPSPULSE_TOKEN}"
HOST="$(hostname -s)"
DC="${OPSPULSE_DC:-DAL}"; ENV="${OPSPULSE_ENV:-PROD}"
VERSION="1.4.2"
NOW="$(date -u +%Y-%m-%dT%H:%M:%SZ)"

json_escape() { sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'; }

# ---- host metrics -----------------------------------------------------------
read -r _ u n s i w _ < /proc/stat; sleep 1; read -r _ u2 n2 s2 i2 w2 _ < /proc/stat
busy=$(( (u2+n2+s2) - (u+n+s) )); total=$(( busy + (i2+w2) - (i+w) ))
CPU=$(awk -v b=$busy -v t=$total 'BEGIN{printf "%.1f", (t>0? b*100/t : 0)}')
MEM=$(free | awk '/Mem:/ {printf "%.1f", ($2-$7)*100/$2}')
DISK=$(df -P /var/mqm 2>/dev/null | awk 'NR==2 {gsub("%","",$5); print $5}')
LOAD=$(cut -d' ' -f1 /proc/loadavg)
UPTIME_H=$(awk '{printf "%d", $1/3600}' /proc/uptime)

# ---- IBM MQ -------------------------------------------------------------------
mq_json=""
if command -v dspmq >/dev/null 2>&1; then
  for QM in $(dspmq -o status | awk -F'[()]' '/Running/ {print $2}'); do
    queues=$(echo "DIS QL(*) WHERE(NOT(QUEUE LK 'SYSTEM.*')) CURDEPTH MAXDEPTH IPPROCS OPPROCS" | runmqsc -e "$QM" |
      awk 'match($0,/QUEUE\(([^)]*)\)/,m){q=m[1]} match($0,/CURDEPTH\(([0-9]+)\)/,m){d=m[1]}
           match($0,/MAXDEPTH\(([0-9]+)\)/,m){x=m[1]} match($0,/IPPROCS\(([0-9]+)\)/,m){ip=m[1]}
           match($0,/OPPROCS\(([0-9]+)\)/,m){op=m[1]; printf "%s{\"name\":\"%s\",\"depth\":%d,\"maxDepth\":%d,\"ipprocs\":%d,\"opprocs\":%d}", sep,q,d,x,ip,op; sep=","}')
    chans=$(echo "DIS CHS(*) STATUS CONNAME" | runmqsc -e "$QM" |
      awk 'match($0,/CHANNEL\(([^)]*)\)/,m){c=m[1]} match($0,/STATUS\(([A-Z]+)\)/,m){printf "%s{\"name\":\"%s\",\"status\":\"%s\"}", sep,c,m[1]; sep=","}')
    mq_json+="${mq_json:+,}{\"name\":\"$QM\",\"status\":\"RUNNING\",\"queues\":[${queues}],\"channels\":[${chans}]}"
  done
fi

# ---- IBM ACE ------------------------------------------------------------------
ace_json=""
if command -v mqsilist >/dev/null 2>&1; then
  for NODE in $(mqsilist | awk -F"'" '/BIP1284I|BIP1325I/ {print $2}'); do
    servers=$(mqsilist "$NODE" | awk -F"'" '/BIP1286I/ {printf "%s{\"name\":\"%s\",\"status\":\"running\"}", sep,$2; sep=","}
                                           /BIP1287I/ {printf "%s{\"name\":\"%s\",\"status\":\"stopped\"}", sep,$2; sep=","}')
    ace_json+="${ace_json:+,}{\"name\":\"$NODE\",\"servers\":[${servers}]}"
  done
fi

# ---- certificates (MQ key repositories) ---------------------------------------
certs=""
for KDB in /var/mqm/qmgrs/*/ssl/key.kdb; do
  [ -f "$KDB" ] || continue
  QM=$(echo "$KDB" | cut -d/ -f5)
  while read -r LABEL; do
    EXP=$(runmqakm -cert -details -db "$KDB" -stashed -label "$LABEL" | awk -F': ' '/Not After/ {print $2}')
    EXP_ISO=$(date -u -d "$EXP" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || echo "")
    certs+="${certs:+,}{\"label\":\"$LABEL\",\"owner\":\"$QM\",\"ownerType\":\"QM\",\"keystore\":\"$KDB\",\"expires\":\"$EXP_ISO\"}"
  done < <(runmqakm -cert -list personal -db "$KDB" -stashed | awk 'NR>1 && NF {sub(/^[-*! ]+/,""); print}')
done

PAYLOAD=$(cat <<EOF
{"agent":{"id":"opspulse-agent@$HOST","version":"$VERSION","host":"$HOST","os":"$(. /etc/os-release; echo "$NAME $VERSION_ID")","dc":"$DC","env":"$ENV","collectedAt":"$NOW"},
 "host":{"cpu":$CPU,"mem":$MEM,"disk":${DISK:-0},"load":$LOAD,"uptimeH":$UPTIME_H,"hist":[]},
 "mq":{"qms":[${mq_json}]},"ace":{"nodes":[${ace_json}]},"certs":[${certs}]}
EOF
)

curl -sS --fail --max-time 10 -X POST "$API_URL" \
  -H "content-type: application/json" -H "x-opspulse-token: $TOKEN" \
  --data-binary "$PAYLOAD" >/dev/null && echo "$NOW sent ${#PAYLOAD} bytes"

In this sandbox the agents are simulated server-side, but they produce the same JSON these scripts send. Point a real agent at /api/v1/ingest with an x-opspulse-token header once an ingest token is configured.

API reference

POST/api/v1/ingestAgent payload (token required)
GET/api/v1/fleetAssembled estate + alerts
GET/api/v1/snapshot?host=Last raw payload for a host
POST/api/v1/actionsAdmin / chaos actions (audited)
POST/api/v1/chatPulse AI assistant
GET/api/v1/healthService health