@toolisticon/ssl-hostinfo-prometheus-exporter
Advanced tools
Comparing version 1.0.1 to 1.0.2-develop-30
@@ -0,1 +1,10 @@ | ||
## [1.0.2](https://github.com/toolisticon/ssl-hostinfo-prometheus-exporter/compare/v1.0.1...v1.0.2) (2019-03-04) | ||
### Bug Fixes | ||
* **Undefined-Response:** Ignore undefined raw data ([86e1e5b](https://github.com/toolisticon/ssl-hostinfo-prometheus-exporter/commit/86e1e5b)) | ||
## [1.0.1](https://github.com/toolisticon/ssl-hostinfo-prometheus-exporter/compare/v1.0.0...v1.0.1) (2019-02-28) | ||
@@ -2,0 +11,0 @@ |
@@ -174,8 +174,21 @@ const moment = require('moment'); | ||
/** | ||
* Check for unallowed raw data contains, e.g. undefined data and normalize it | ||
* | ||
* @param {*} rawData | ||
*/ | ||
function normalizePrometheusDate (rawData) { | ||
if (rawData) { | ||
return `${rawData}\n`; | ||
} else { | ||
return ''; | ||
} | ||
} | ||
function renderMetrics () { | ||
let response = ''; | ||
Object.keys(resultStore).map((host) => { | ||
response += `${resultStore[host].moz}\n`; | ||
response += `${resultStore[host].details}\n`; | ||
response += `${resultStore[host].expire}\n`; | ||
response += `${normalizePrometheusDate(resultStore[host].moz)}`; | ||
response += `${normalizePrometheusDate(resultStore[host].details)}`; | ||
response += `${normalizePrometheusDate(resultStore[host].expire)}`; | ||
}); | ||
@@ -182,0 +195,0 @@ return response; |
{ | ||
"name": "@toolisticon/ssl-hostinfo-prometheus-exporter", | ||
"version": "1.0.1", | ||
"version": "1.0.2-develop-30", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
34097
362
1