We have servers where there are multiple DBs hosted. Not all of them undergo the maintenance window at the same time. So the DB team would like to have the option of putting only the required DB instance to SDT.
We have servers where there are multiple DBs hosted. Not all of them undergo the maintenance window at the same time. So the DB team would like to have the option of putting only the required DB instance to SDT.
You can set SDT at almost any level in the resource or website tree. I’m not sure what specific check you are using, but click on the specific DB entry in the left tree on the resources page, then click on the SDT tab and add an SDT that will only apply to that entry.
Yeah, you can do that. You’d have to select each instance and define the SDT there though. Just click on the instance then go to the SDT tab.
If you want to manage it programmatically, you can use the API/SDK. Just do a post to /sdt/sdts with payload like this:
{
"type": "DeviceDataSourceInstanceSDT",
"dataSourceInstanceId": 1693806,
"sdtType": "oneTime",
"startDateTime": 1675970040000,
"endDateTime": 1675973640000,
"timezone": "America/New_York",
"comment": "SDT Notes here"
}
Trick is getting the dataSourceInstanceId. But if you find out the datasource ID by doing a GET on:
/setting/datasources?filter=name:\”The_DS_Short_Name_Not_displayName\”&fields=id,name,displayName
You can also get this from the URL once you’re looking at the DS on the settings page.
Now you have the DS ID. Then you can do a GET on:
/device/devices/{deviceId}/instances?filter=dataSourceId:”{DS_ID}”&size=1000&fields=id,name,displayName
From that response, use the id in your post to /sdt/sdts.
Hi
Thanks for your response. I apologize for not properly paraphrasing my question.
Actually we have multiple datasources for DB monitoring, and under each one of them there are multiple DB instances.
Now if one particular undergoes a maintenance window, we have to manually go inside each of the datasource’s discovered instances and put them in SDT. That’s a tedious job.
So we were looking to see if there’s any efficient way of doing that.
Thanks
Ah, not that I know of for particular instances. Something like that might be best to do using the API. I’ve seen setups where companies have created special bulk-sdt scripts for these cases.
Like what Stuart mentions above.
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.