Forum Discussion

usnishguha's avatar
usnishguha
Icon for Neophyte rankNeophyte
2 years ago

Can we put only of the running Oracle instances in one server 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.

  • Hi @Mike Moniz,

     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

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

  • Anonymous's avatar
    Anonymous

    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.

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

  • Anonymous's avatar
    Anonymous

    Ah, so you want to cascade SDT from one instance on one device, to another instance on the same device under a different datasource?

    That could be done too, but would need to be done programmatically.