Skip to content

Commit

Permalink
Merge pull request #1 from colin-lee/master
Browse files Browse the repository at this point in the history
add custom port
  • Loading branch information
awaragi authored Oct 5, 2017
2 parents 692302a + f614ee2 commit 017735e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const metrics = require('./metrics').metrics;
let config = {
connect: {
server: process.env["SERVER"],
port: process.env["PORT"] || 1433,
userName: process.env["USERNAME"],
password: process.env["PASSWORD"],
options: {
port: process.env["PORT"] || 1433,
encrypt: true,
rowCollectionOnRequestCompletion: true
}
Expand Down Expand Up @@ -110,10 +110,10 @@ app.get('/metrics', async (req, res) => {
});

const server = app.listen(config.port, function () {
debug(`Prometheus-MSSQL Exporter listening on local port ${config.port} monitoring ${config.connect.userName}@${config.connect.server}:${config.connect.port}`);
debug(`Prometheus-MSSQL Exporter listening on local port ${config.port} monitoring ${config.connect.userName}@${config.connect.server}:${config.connect.options.port}`);
});

process.on('SIGINT', function () {
server.close();
process.exit(0);
});
});

0 comments on commit 017735e

Please sign in to comment.