Configuration and Script Examples
To verify that your TIBCO® Messaging Monitor for Apache Pulsar™ installation is ready for configuration and deployment, perform the following general tasks and confirmations. This topic contains simple default configurations and usage examples; your requirements may vary.
- Ensure that you have Python 3 and Java installed before you begin.
- Run the following script to install any Python dependencies required by Apache Pulsar Monitoring:
pip3 install -r /opt/tibco/msgmon/apd/requirements.txt
Edit the config/pulsar_config.yaml file
Begin by editing the
pulsar_config.yaml file, which is located in
/opt/tibco/msgmon/apd/config/
This file contains configuration information pertaining to the Apache Pulsar cluster to be monitored. Edit this file to enter specifics about your Apache Pulsar Cluster and Apache BookKeeper nodes. You may need to modify the following fields:
settings:
grafana:
url, username, password
datasource:
type, access, basicAuth, isDefault
influxDB:
url, username, password
The default configuration in MSGMON Core at /opt/tibco/msgmon/config/
should be sufficient to start the InfluxDB and Grafana services.
Start Pulsar Monitoring
Start monitoring using the following procedure:
- Change to the monitoring directory:
cd /opt/tibco/msgmon/apd/bin
- Run the start script.
python3 msgmon-pulsar-start.py -pc /opt/tibco/msgmon/apd/config/pulsar_config.yaml
You see an output similar to the following:
************************************* TIBCO Messaging Monitoring - Apache Pulsar Plugin: 1.0.0 V2 ************************************* INFO [argument_parser.py:115] MSGMON-Pulsar logging level set to INFO INFO [measurements.py:46] Successfully loaded all templates. INFO [validate.py:40] Validation successful. Pulsar-config @/opt/tibco/msgmon/apd/config/pulsar_config.yaml INFO [starter.py:38] Status File @ : /var/tmp/phonnaka/tibco-msgmon/status/msgmon-pulsar.yaml INFO [starter.py:56] Starting tibrover. INFO [starter.py:104] Successfully wrote/updated TIBROVER config file @ : /var/tmp/phonnaka/tibco-msgmon/TIBROVER_CONFIG/tibrover-config.yaml INFO [starter.py:118] tibrover homepath : /opt/tibco/msgmon/apd/tibrover INFO [starter.py:164] TibRover started @pid : 32184 INFO [loader.py:147] Grafana Datasource HTTP-Post Response Status Code: 200 INFO [loader.py:148] Grafana Datasource HTTP-Post Response: {"datasource":{"id":1,"orgId":1,"name":"TIBCO Messaging","type":"influxdb","typeLogoUrl":"","access":"proxy","url":"http://localhost:8086","password":"admin","user":"admin","database":"pulsar","basicAuth":false,"basicAuthUser":"","basicAuthPassword":"","withCredentials":false,"isDefault":true,"jsonData":{},"secureJsonFields":{},"version":1,"readOnly":false},"id":1,"message":"Datasource added","name":"TIBCO Messaging"} INFO [loader.py:69] Grafana Dashboard Path: /opt/tibco/msgmon/apd/tibpmon/lib/../../tibpmon/grafana-dashboards INFO [loader.py:88] Successfully posted grafana-dashboard @ /opt/tibco/msgmon/apd/tibpmon/lib/../../tibpmon/grafana-dashboards/InfluxDB-cluster-member-system-statistics.json INFO [loader.py:89] Grafana Dashboard HTTP-Post Response: {"id":1,"slug":"cluster-member-system-statistics","status":"success","uid":"KCAu4FsGk","url":"/d/KCAu4FsGk/cluster-member-system-statistics","version":1} INFO [influx.py:218] InfluxDB server at http://localhost:8086 reports version 1.8.2
-h option.
Check Monitoring Status
To check that the monitoring for all of the cluster elements has started, enter:
python3 msgmon-pulsar-status.py
You see an output similar to the following:
************************************* TIBCO Messaging Monitoring - Apache Pulsar Plugin: 1.0.0 V2 ************************************* INFO [msgmon-pulsar-status.py:145] MSGMON-Pulsar logging level set to INFO INFO [msgmon-pulsar-status.py:95] Status File loaded from: /var/tmp/phonnaka/tibco-msgmon/status/msgmon-pulsar.yaml ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TibRover Status : Running ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To see detailed information about the status of jmxTrans and Apache Pulsar clusters being monitored, use the command using the
--detailed option as follows:
python3 msgmon-pulsar-status.py --detailed.
Stop Monitoring
To stop monitoring of your Apache Pulsar cluster, run the stop script:
python3 msgmon-pulsar-stop.py
You see an output similar to the following:
************************************* TIBCO Messaging Monitoring - Apache Pulsar Plugin: 1.0.0 V2 ************************************* INFO [msgmon-pulsar-stop.py:174] MSGMON-Pulsar logging level set to INFO INFO [msgmon-pulsar-stop.py:113] Status File loaded from: /var/tmp/phonnaka/tibco-msgmon/status/msgmon-pulsar.yaml INFO [msgmon-pulsar-stop.py:121] Stopped process TibRover running with pid: 32184 INFO [msgmon-pulsar-stop.py:143] Status File written to : /var/tmp/phonnaka/tibco-msgmon/status/msgmon-pulsar.yaml