Skip to content

Commit

Permalink
feat(influxdb): Store Butler SOS version as tag when storing uptime data
Browse files Browse the repository at this point in the history
Implements #688
  • Loading branch information
Göran Sander committed Dec 14, 2023
1 parent 6295290 commit 28e7878
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 @@ -459,7 +459,7 @@ const influx = new Influx.InfluxDB({
external: Influx.FieldType.FLOAT,
process_memory: Influx.FieldType.FLOAT,
},
tags: ['butler_sos_instance'],
tags: ['butler_sos_instance', 'version'],
},
// {
// measurement: 'user_events',
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 @@ -376,11 +376,15 @@ function postProxySessionsToInfluxdb(userSessions) {
function postButlerSOSMemoryUsageToInfluxdb(memory) {
globals.logger.debug(`MEMORY USAGE: Memory usage ${JSON.stringify(memory, null, 2)})`);

// Get Butler version
const butlerVersion = globals.appVersion;

const datapoint = [
{
measurement: 'butlersos_memory_usage',
tags: {
butler_sos_instance: memory.instanceTag,
version: butlerVersion,
},
fields: {
heap_used: memory.heapUsedMByte,
Expand Down

0 comments on commit 28e7878

Please sign in to comment.