newrelic / newrelic-unix-monitor

Monitoring service for Unix (AIX, Linux, HP-UX, MacOS, Solaris) systems
https://docs.newrelic.com/docs/infrastructure/host-integrations/host-integrations-list/unix-monitoring-integration/
Other
30 stars 23 forks source link

unable to update agent name with custom hostname #59

Closed pragatihegde closed 4 weeks ago

pragatihegde commented 1 year ago

Hello All,

I have been trying to update the hostname of one of our server with a customized name. However, it is not using the custom name instead its passing the server-defined hostname

{ "global": { "OS": "auto", "account_id": "", "insights_mode": { "insights_insert_key": "", "insights_data_center": "US" } }, "agents": [ { "name": "abcs.xyz.com" //here you can add the server name as defined in ServiceNow CI } ] }

In the above eg., above hostname would be displayed as abcs.xyz.com but it is not. It is using the system-defined hostname that is abcs.

Can you please check and help us to correct this.

gsidhwani-nr commented 4 months ago

Use the Sample as below . We did not find any error.

This is the agent name you should refer to and not the host name . Please check again. Here is my sample plugin.json file and it is working as expected. Please refer snapshot attached. Please also let me know if you are still facing the issue.

{
    "global": {
        "OS": "awsubuntu",
        "account_id": "aaaaaaaa",
        "insights_mode": {
            "insights_insert_key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "insights_data_center": "US",
            "interval":30
        }
    },
    "agents": [
        {
            "name": "myhost.domain.com",
            "static": {
                "attribute1": "country",
                "attribute2": "INDIA"
            }
        }
    ]
}