Skip to content

Commit

Permalink
feat(influxdb): Add Butler version tag to uptime data sent to InfluxDb
Browse files Browse the repository at this point in the history
Implements #919
  • Loading branch information
Göran Sander committed Dec 13, 2023
1 parent 47e08ad commit e60528a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ if (config.get('Butler.influxDb.enable')) {
external: Influx.FieldType.FLOAT,
process_memory: Influx.FieldType.FLOAT,
},
tags: ['butler_instance'],
tags: ['butler_instance', 'version'],
},
{
measurement: 'win_service_state',
Expand Down
4 changes: 4 additions & 0 deletions src/lib/post_to_influxdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ const _ = require('lodash');
const globals = require('../globals');

function postButlerMemoryUsageToInfluxdb(memory) {
// Get Butler version
const butlerVersion = globals.appVersion;

let datapoint = [
{
measurement: 'butler_memory_usage',
tags: {
butler_instance: memory.instanceTag,
version: butlerVersion,
},
fields: {
heap_used: memory.heapUsedMByte,
Expand Down

0 comments on commit e60528a

Please sign in to comment.