Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ping every second extension error



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




Dynatrace Guru
Dynatrace Guru

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.



DynaMight Guru
DynaMight Guru


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
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.

Antonio Sousa

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 




From the screenshot, something is clearly wrong. Some points:

  1. On November 25th, the extension managed to rotate the original file.
  2. The permissions of the files seem OK
  3. The size of the last file is clearly too high, and shows that data is not being processed

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.

Antonio Sousa


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.

Antonio Sousa

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 



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.

Antonio Sousa


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.

Antonio Sousa

Community Team
Community Team

Hi @AliSaeed, did the solution Antonio mentioned work for you or are you still facing the issue?

The only constant is change. Finding ways for great things to happen!

Featured Posts