01 Dec 2022 12:18 PM - last edited on 17 May 2023 02:54 PM by Michal_Gebacki
Hello,
I have configured the Dynatrace extension "Ping every second" for the health check of my devices.
But I am getting an error "device is not defined". But there is no device section/option available in the extension configuration. Kindly help finds a solution. Screenshots are attached. Thanks
01 Dec 2022 12:31 PM
There is a "Request support" button on the hub tile. Seeing as it's a partner created extension that's going to be the quickest way for you to get help.
https://www.dynatrace.com/hub/detail/ping-every-second/
Mike
01 Dec 2022 01:19 PM
I'm from the partner that created the Extension. I'll try to help you here, so it might help others also 🙂
First, please verify if you followed the steps in https://community.dynatrace.com/t5/Extensions/Ping-Every-Second/m-p/197116
There is a step that requires running a ping command, that is not usual for normal extensions. You might have missed that. Please confirm that in your /tmp there are the files mentioned: for each IP there should be two files.
07 Dec 2022 06:58 AM - edited 07 Dec 2022 07:00 AM
Hello @AntonioSousa,
Yes, I followed the same steps provided in the link you mentioned. I first enabled a ping script/command on my active gate, fetching information as required by the extension. Please find below a screenshot of files created in the /tmp directory.
The date of 1 file is old because I stopped the extension due to this error. The second file is updated as the script/command runs per the guidelines. Thank you
07 Dec 2022 08:10 AM
From the screenshot, something is clearly wrong. Some points:
I would ask if you can look at the dyna1_* file and see if it is showing that the ping was/is working. If you could share one line from the file, it would help.
07 Dec 2022 08:25 AM
File size may be high as the extension is disabled and thus not purging the file as expected.
Please find below the line from the file for your review. Thanks
07 Dec 2022 10:00 AM
So, it really looks like something is not being done correctly by the extension.
Could you please check the logfile named PingEverySecond.log
in the following directory:
/var/lib/dynatrace/remotepluginmodule/log/remoteplugin/custom.remote.python.pingEverySecond
and try to check if the message "name 'device' is not defined" appears. Please forward the associated lines if possible, with sensitive information removed.
08 Dec 2022 01:00 PM
Hello @AntonioSousa,
Please find below a screenshot of the error I found in the log file.
I also found another issue in the logs the extension is unable to create a socket with the active gate as the extension trying to connect on the default port (9999) but we have configured a custom port for our active gate. Although we have changed the port for all extensions in the config file it seems like this extension has a hard-coded port. Can you confirm how can I change the port number in this extension to the correct one to resolve this issue too? Thanks
08 Dec 2022 02:05 PM
Hi @AliSaeed,
Thanks for the debug! Indeed, port 9999 is hardwired in the code, and it explains what you were seeing.
I'll try to release a new version later today. I just have to make the fix work in your circumstances, and also not break in other cases.
09 Dec 2022 09:08 PM
I have uploaded a new version to GitHub. Would appreciate if you can tell me if it's working, after changing the port to the one you are using, in the extension configuration.
05 Jan 2023 11:52 AM
Hi @AliSaeed, did the solution Antonio mentioned work for you or are you still facing the issue?