01 Dec 2022 04:18 AM - last edited on 17 May 2023 06:54 AM by Michal_Gebacki
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
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.
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.
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
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.
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
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:
and try to check if the message "name 'device' is not defined" appears. Please forward the associated lines if possible, with sensitive information removed.
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
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.
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.
Hi @AliSaeed, did the solution Antonio mentioned work for you or are you still facing the issue?