Skip to content

Commit de6af21

Browse files
yac01laf
authored andcommitted
fix correction of the echo of the opentsdb function to debug (librenms#7086)
* feat: ADD co field for Opentsdb * Update opentsdb.inc.php * Update OpenTSDB.md * Update opentsdb.inc.php add d_echo for debugging * Delete 200.sql * Update OpenTSDB.md * Update db_schema.yaml * Update opentsdb.inc.php * Update opentsdb.inc.php
1 parent fc2041c commit de6af21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

includes/opentsdb.inc.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* LibreNMS
44
*
5-
* Copyright (c) 2017 Yacine Ben <https://github.com/yac01/librenms.git >
5+
* Copyright (c) 2017 Yacine Benamsili <https://github.com/yac01/librenms.git >
66
*
77
* This program is free software: you can redistribute it and/or modify it
88
* under the terms of the GNU General Public License as published by the
@@ -18,9 +18,11 @@ function opentsdb_update($device, $measurement, $tags, $fields)
1818
if ($config['opentsdb']['enable'] == true) {
1919
if ($opentsdb != true) {
2020
$opentsdb = fsockopen($config['opentsdb']['host'], $config['opentsdb']['port']);
21-
d_echo("Connection made to OpenTSDB");
21+
}
22+
if ($opentsdb == true) {
23+
d_echo("Connection to OpenTSDB is done\n");
2224
} else {
23-
d_echo("Connection to OpenTSDB has failed");
25+
d_echo("Connection to OpenTSDB has failed\n");
2426
}
2527

2628
$flag=$config['opentsdb']['co'];

0 commit comments

Comments
 (0)