once more, thanks for helping me out. After I realized I also have to put the port into the docker-compose.yml it worked :-).
Many thanks for your support. Next time you're in Zurich, I'll pay you a beer...
Original Message:
Sent: Tue February 11, 2025 09:14 AM
From: Andrey Klyachkin
Subject: nextract plus to telegraf
Hi Jörg,
thank you for the information!
Create an additional InfluxDB HTTP Listener in your telegraf.conf file like:
[[inputs.influxdb_listener]]service_address = ":8886"read_timeout = "2s"
Restart telegraf
Reconfigure nextract to point to the listener
Start nextract, it should send the data correctly
Check with curl, that the data came - curl http://10.1.224.31:8099/metrics
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue February 11, 2025 07:38 AM
From: Joerg Kauke
Subject: nextract plus to telegraf
Hello Andrey,
thanks for getting into it.
First, I run nextract plus on our NIM server, try to send the InfluxDB formated data to the telegraf container running on a SLES 15.
Nextract config json looks like this:
{"hmc_hostname": "svrifahmc-02","hmc_user": "nextractplus","hmc_password": "*************","output_nchart": 0,"output_json": 0,"output_csv": 0,"comment1": "Valid setting for output_influx = 0 (off), 1 or 2","output_influx": 1,"comment2": "InfluxDB 1.x options","ihost": "10.1.224.31","iport": 8888,"iuser": "","ipassword": "","idbname": ""}
and this is the error it got:
/usr/local/scripts/nextractplus_v41/nextract_plus.py opening config file:./svrifahmc02_2_telegraf.json-> nextract_plus version 41 saving JSON=0 Influx=1-> Logging on to svrifahmc-02 as hmc_usernextractplus-> Get Preferences-> Parse Preferences-> ALL servers:-> Server name=svrifa922-00_SN780C540 agg=true longterm=true - OK-> Server name=svrifa922-01_SN780C550 agg=true longterm=true - OK-> Servers with Perf Stats--> Server=1 Name=svrifa922-00_SN780C540 - Requesting the data ...---> Received 12 file(s) in 0.46 seconds----> Server Name=svrifa922-00_SN780C540 MTM + Serial Number=9223-22H*780C540----> Server Date=2025-02-11 start=11:28:00 end=13:27:00----> Server DataType=Processed Interval=30 seconds----> LPAR=svrseng1-0----> LPAR=svrsdb3-0Adding 26397 records to InfluxDB for Server=svrifa922-00_SN780C540Traceback (most recent call last): File "/opt/freeware/lib/python3.9/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( File "/opt/freeware/lib/python3.9/site-packages/urllib3/connectionpool.py", line 537, in _make_request response = conn.getresponse() File "/opt/freeware/lib/python3.9/site-packages/urllib3/connection.py", line 461, in getresponse httplib_response = super().getresponse() File "/opt/freeware/lib64/python3.9/http/client.py", line 1377, in getresponse response.begin() File "/opt/freeware/lib64/python3.9/http/client.py", line 320, in begin version, status, reason = self._read_status() File "/opt/freeware/lib64/python3.9/http/client.py", line 289, in _read_status raise RemoteDisconnected("Remote end closed connection without"http.client.RemoteDisconnected: Remote end closed connection without responseDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/opt/freeware/lib/python3.9/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/opt/freeware/lib/python3.9/site-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( File "/opt/freeware/lib/python3.9/site-packages/urllib3/util/retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) File "/opt/freeware/lib/python3.9/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/opt/freeware/lib/python3.9/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( File "/opt/freeware/lib/python3.9/site-packages/urllib3/connectionpool.py", line 537, in _make_request response = conn.getresponse() File "/opt/freeware/lib/python3.9/site-packages/urllib3/connection.py", line 461, in getresponse httplib_response = super().getresponse() File "/opt/freeware/lib64/python3.9/http/client.py", line 1377, in getresponse response.begin() File "/opt/freeware/lib64/python3.9/http/client.py", line 320, in begin version, status, reason = self._read_status() File "/opt/freeware/lib64/python3.9/http/client.py", line 289, in _read_status raise RemoteDisconnected("Remote end closed connection without"urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/scripts/nextractplus_v41/nextract_plus.py", line 610, in <module> client.write_points(entry) File "/opt/freeware/lib/python3.9/site-packages/influxdb/client.py", line 614, in write_points return self._write_points(points=points, File "/opt/freeware/lib/python3.9/site-packages/influxdb/client.py", line 692, in _write_points self.write( File "/opt/freeware/lib/python3.9/site-packages/influxdb/client.py", line 424, in write self.request( File "/opt/freeware/lib/python3.9/site-packages/influxdb/client.py", line 343, in request response = self._session.request( File "/opt/freeware/lib/python3.9/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/opt/freeware/lib/python3.9/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/opt/freeware/lib/python3.9/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
And this is my telegraf config, like Nigel suggested for nimin.
[[outputs.prometheus_client]] listen = ":8099" metric_version = 2 path = "/metrics" expiration_interval = "120s" string_as_label = false[[inputs.socket_listener]] service_address = "tcp://:8888" data_format = "influx" read_buffer_size = "256KiB" read_timeout = "2s"
So, I'm not familiar with databases nor with telegraf in deep.
I think it comes from the missing 'iuser / ipassword' or 'idbname'.
But I couldn't find any description on, how to add a database name to telegraf.
All I found was a suggestion to save the output to a file and then read the file to a local installed telegraf instance.
kindly regards,
Joerg
------------------------------
Joerg Kauke
Unix Administrator
COOP Switzerland
------------------------------