Hi Jarrett,
There are two ways to update the display name of servers.
Option 1: Export and Import Monitors Option
By using the Export and Import Monitors option, you will be able to download the list of server monitors and its configurations as a CSV file, update them, and upload it back to Site24x7.
- Log in to Site24x7 web client, go to Admin > Inventory > Export Monitors.
- Select the Resource Type as Monitor Types and select Server Monitor from the drop-down. Click on Export.
- Change the display_name for the servers whose display name needs to be updated and remove the other rows in the CSV file.
- Now in the Site24x7 web client, go to Admin > Inventory > Import Monitors. Using the Import option, update the CSV file that has the new server monitor display names.
This will update the display name for the respective servers. This is a bulk option and can be used to update the display names of multiple servers in one go.
Option 2: via APIs
Use the Update Monitor API to update the display name of a server monitor. This can be done only for one monitor at a time.
For example, say you want to change the display name from "vm-4" to "production server". Update the display_name field with "production server" and call the API as follows:
PUT https://www.site24x7.com/api/monitors/<monitor ID>
{
"threshold_profile_id": <threshold_profile_id>,
"type": "SERVER",
"display_name": "production server",
"templateid": "-",
"user_group_ids": [
<user_group_ids>
],
"hostname": "plus-vm-4",
"perform_automation": false,
"log_needed": true,
"sm_poll_interval": 1,
"notification_profile_id": <notification_profile_id>,
"server_type": "LINUX"
}
The above API will be able to update the display name of the monitor_id which is passed. The monitor_id can be obtained from the API - https://www.site24x7.com/help/api/#list-monitor
Hope this helps. Let us know for further queries, if any, in the below thread.
Regards,
Vinoth