Forum Discussion

StLaurie's avatar
StLaurie
Icon for Neophyte rankNeophyte
3 years ago

MSSQL Instances Auto Property Override

We have a Windows server with multiple MS SQL Instances running, but only want to monitor 1 instance. I have added the custom property: mssql.sql_server_instances with the value of the instance in this case 'SQL2016DEV' however it doesn't appear to be overriding auto property (auto.sql_server_instances) the MS SQL Dbs that are being monitored or alerted on.

I am going to the root of the device that, then the Info Tab and then clicking the cog above the custom property table, scrolling to properties and adding the custom property mssql.sql_server_instances in there. Is this the correct method?

 

Cheers!

  • Anonymous's avatar
    Anonymous

    Assume the main DS you're having difficulty with is Microsoft_SQLServer_Databases, that method should work because of this line:

    def sqlInstances = hostProps.get("mssql.sql_server_instances") ?: hostProps.get("auto.sql_server_instances")  // override sql instances with manual instances

    Take it back to the source and test active discovery at the datasource to see if you get the same behavior. If you're still getting more than you wanted, I would next take the script to the script debug console and flip the debug boolean to true. That should give you more output to help figure out what is happening inside the script and where the problem might be.