Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ webapp-hashing@1.0.9
rocketchat:oauth2-server
rocketchat:i18n
dandv:caret-position
facts-base
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ejson@1.1.1
email@1.2.3
es5-shim@4.8.0
facebook-oauth@1.6.0
facts-base@1.0.1
fastclick@1.0.13
fetch@0.1.1
geojson-utils@1.0.10
Expand Down
8 changes: 8 additions & 0 deletions app/metrics/server/lib/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import connect from 'connect';
import _ from 'underscore';
import gcStats from 'prometheus-gc-stats';
import { Meteor } from 'meteor/meteor';
import { Facts } from 'meteor/facts-base';

import { Info, getOplogInfo } from '../../../utils/server';
import { Migrations } from '../../../migrations';
Expand Down Expand Up @@ -99,6 +100,13 @@ metrics.totalPrivateGroupMessages = new client.Gauge({ name: 'rocketchat_private
metrics.totalDirectMessages = new client.Gauge({ name: 'rocketchat_direct_messages_total', help: 'total of messages in direct rooms' });
metrics.totalLivechatMessages = new client.Gauge({ name: 'rocketchat_livechat_messages_total', help: 'total of messages in livechat rooms' });

// Meteor Facts
metrics.meteorFacts = new client.Gauge({ name: 'rocketchat_meteor_facts', labelNames: ['pkg', 'fact'], help: 'internal meteor facts' });

Facts.incrementServerFact = function(pkg, fact, increment) {
metrics.meteorFacts.inc({ pkg, fact }, increment);
};

const setPrometheusData = async () => {
metrics.info.set({
version: Info.version,
Expand Down