Skip to content

Commit

Permalink
feat: use 9839 as default port
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Jul 17, 2021
1 parent 36f41f1 commit b2e9e19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const knownFlags = {
},
'--listen.port': {
internalName: 'port',
default: '127.0.0.1',
default: '9839',
description: 'the port the exporter user to listen for incoming connections'
},
'--metrics.endpoint': {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const flags = require('./flags')
const commandLineFlags = flags(process.argv)

const host = commandLineFlags.host || process.env.EXPORTER_LISTEN_HOST || '127.0.0.1'
const port = commandLineFlags.port || process.env.EXPORTER_LISTEN_PORT || '48151'
const port = commandLineFlags.port || process.env.EXPORTER_LISTEN_PORT || '9839'
const endpoint = commandLineFlags.endpoint || process.env.EXPORTER_METRICS_ENDPOINT || '/metrics'
const prefix = commandLineFlags.prefix || process.env.EXPORTER_METRICS_PREFIX || 'what'
const appendTimestamp = commandLineFlags.timestamp || Boolean(process.env.EXPORTER_METRICS_APPEND_TIMESTAMP)
Expand Down
2 changes: 1 addition & 1 deletion test/spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('WhatActiveUsersExporter', () => {
it('exports the active users metric', () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
http.get('http://localhost:48151/metrics', (response) => {
http.get('http://localhost:9839/metrics', (response) => {
if (response.statusCode !== 200) {
reject(response.statusCode)
return
Expand Down

0 comments on commit b2e9e19

Please sign in to comment.