Datadog: “could not retrieve nginx version info”

Apparently Datadog fails to retrieve nginx version information when server_tokens directive in nginx configuration is set to off.

You can keep server_tokens disabled globally, instead enable it for the “nginx_status” server — like so:

server {
    listen 81;
    server_name localhost;
    ...
    server_tokens on; # <-----
    location /nginx_status {
        ...
        stub_status;
        ...
    }
}
This entry was posted in How to’s and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *