poniedziałek, grudnia 18, 2017

Modern Tibco monitoring with JMX, Prometheus and Grafana












{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "hideControls": false,
  "id": 9,
  "links": [],
  "refresh": false,
  "rows": [
    {
      "collapse": false,
      "height": 507,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": null,
          "description": "$bw_apps",
          "fill": 1,
          "id": 1,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": false,
            "min": false,
            "show": true,
            "sortDesc": false,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "repeat": "bw_apps",
          "scopedVars": {
            "bw_apps": {
              "selected": true,
              "text": "TRA|BWPublicationService-1.tra",
              "value": "TRA|BWPublicationService-1.tra"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 12,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "Bw_createdJobs{component=~\"$bw_apps\",job=~\"tibco-bw-prod.*\"}",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "Created on {{host}} > {{object}}",
              "metric": "Bw_createdJobs",
              "refId": "A",
              "step": 120
            },
            {
              "expr": "Bw_completedJobs{component=~\"$bw_apps\",job=~\"tibco-bw-prod.*\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Completed on {{host}} > {{object}}",
              "metric": "Bw_completedJobs",
              "refId": "B",
              "step": 120
            },
            {
              "expr": "Bw_abortedJobs{component=~\"$bw_apps\",job=~\"tibco-bw-prod.*\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Aborted on {{host}} > {{object}}",
              "metric": "Bw_abortedJobs",
              "refId": "C",
              "step": 120
            },
            {
              "expr": "Bw_inFlightJobs{component=~\"$bw_apps\",job=~\"tibco-bw-prod.*\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Waiting on {{host}} > {{object}}",
              "metric": "Bw_inFlightJobs",
              "refId": "D",
              "step": 120
            },
            {
              "expr": "Bw_hasErrors{component=~\"$bw_apps\",job=~\"tibco-bw-prod.*\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Errors on {{host}} > {{object}}",
              "metric": "Bw_hasErrors",
              "refId": "E",
              "step": 120
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "$bw_apps",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "TRA|BWPublicationService-1.tra",
          "value": [
            "TRA|BWPublicationService-1.tra"
          ]
        },
        "datasource": "PrometheusBwMonitoring",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "bw_apps",
        "options": [],
        "query": "label_values(Bw_cores,component)",
        "refresh": 1,
        "regex": "TRA.*|BW.*",
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-30d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "BW Jobs",
  "version": 7
}


9 komentarze:

Anonimowy pisze...

Can you please explain in detail? How data is received by http receiver?

jakub007 pisze...

BW HTTP Receiver is triggered by Prometheus. In case of BW metrics we connect to every JVM returned by VirtualMachine.list() and query Tibco JMX bean + standard beans. Gathered data is exposed in Prometheus wire format (simple text). In case of EMS TibjmsAdmin API is used for stats.

Anonimowy pisze...

Thanks for the explanation. Also, if possible can you attach a sample grafana dashboard too. That will help a lot for newbie like me.

Anonimowy pisze...

Thanks. I tried with this dashboard also and having the same issue with query filter "component=~"$bw_apps". It says no data point after setting this filter. Am i missing something? Here is the sample query.

Bw_completedJobs{job=~"tibco-bw-prod.*"} --- Works fine
Bw_completedJobs{component=~"$bw_apps", job=~"tibco-bw-prod.*"} --- No datapoint

Bw_completedJobs{component="TRA|SampleProcess-SampleProcess.tra",host="f-tibam301lv",instance="host1:9095",job="tibco-bw-prod",object="BusinessProcesses/ProcessStarters/CreateErrorAckFile.process/Timer",type="process"}

Thanks again for all the help.

jakub007 pisze...

Sorry for delay. A lot of work on production. In Grafana there is a concept of variable. Thanks to variable from the set diagrams can be presented per BW application. In your example $bw_apps is not defined.

Anonimowy pisze...

$bw_apps was defined but the query was not parsing it correctly. Here is the working query((Grafana v5.1)).
Bw_createdJobs{component="${bw_apps:glob}",job=~"tibco-bw-prod.*"}

Anonimowy pisze...

Hello,

Ijust stumpled upon this and it looks very interessting. Can you provide with some instructions how to set this up with prometheus?

BR
TC

jakub007 pisze...

Just add http://host:9091 in Prometheus configuration. Port 9091 is default for BW metrics and 9092 for EMS.

Henry Hill pisze...

Very Informative and creative contents. This concept is a good way to enhance knowledge. Thanks for sharing. Continue to share your knowledge through articles like these.

Data Engineering Services 

Data Analytics Solutions

Artificial Intelligence Solutions

Data Modernization Solutions