status model supprt
test-org/integration-module/pipeline/pr-rc This commit looks good
Details
test-org/integration-module/pipeline/pr-rc This commit looks good
Details
parent
ff68178e42
commit
dfeb0dbfa9
|
|
@ -9,6 +9,10 @@ DB_DBNAME = "db_name"1
|
|||
# Prometheus-Exporter info
|
||||
EXPORTER_URL = "http(s)://ip.ip.ip.ip:port"
|
||||
|
||||
# Status Model API support
|
||||
# > if exists, ignore `EXPORTER_URL` var
|
||||
STATUS_SYSTEM_URL = "http://192.168.2.39:9999/api/input"
|
||||
|
||||
# eNODE.Monitoring configuration
|
||||
ENODE_MONITORING_IP = "ip.ip.ip.ip"
|
||||
ENODE_MONITORING_LOGIN = "admin_user_enode_monitoring" # admin user is required
|
||||
|
|
|
|||
|
|
@ -114,12 +114,13 @@ impl Exporter {
|
|||
/// Exports metrics in `PrometheusMetricsExtended` format to Exporter defined
|
||||
/// as env var $EXORPTER_URL
|
||||
pub async fn export_extended_metrics(metrics: PrometheusMetricsExtended) -> Result<usize> {
|
||||
let url = env::var("EXPORTER_URL")?;
|
||||
// let url = env::var("EXPORTER_URL")?;
|
||||
let url = env::var("STATUS_SYSTEM_URL").unwrap_or(env::var("EXPORTER_URL")?);
|
||||
|
||||
debug!("Exporting: {:?}", &metrics);
|
||||
|
||||
let req = Client::new()
|
||||
.post(url)
|
||||
.post(&url)
|
||||
.json(&metrics)
|
||||
.send().await;
|
||||
req?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue