Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 Microsoft SQL templates appear to be missing information #41

Closed
MatthewSteeves opened this issue Feb 24, 2022 · 5 comments · May be fixed by #256
Closed

2 Microsoft SQL templates appear to be missing information #41

MatthewSteeves opened this issue Feb 24, 2022 · 5 comments · May be fixed by #256

Comments

@MatthewSteeves
Copy link

template_app_ms_sql_database_discovery_(lld)
references key: windowsdb.discovery
template_app_ms_sql_instance_discovery_(lld)
references key: windowssqlinstances.discovery

These are not agent or agent2 built-in keys. Therefore there must have been additional scripts or at least user parameters that would need to be defined. These templates should be marked as incomplete, or the additional information added.

I tried searching for more info using:

@RangersMS
Copy link

Hi, I'm having the same issue right now. Tested it with Zabbix Agent 2 5.0.24 and 6.0.5.

@ablecable
Copy link

I'm also having the same issue

@chi110r
Copy link

chi110r commented May 24, 2023

I faced the same issue and reversed engineered the discovery for the instances discovery for our Infrastructure.

$services = Get-Service "mssql$*"|Select-Object -ExpandProperty Name
$data = foreach ($service in $services) {
    [PSCustomObject]@{
		"{#INSTANCES}" = $service
	}
}

$data|ConvertTo-Json
UserParameter=windowssqlinstances.discovery[*],powershell.exe -command "& '%programfiles%\Zabbix\scripts\windowssqlinstances.ps1'"

I don't know if the instance names always match the name of the service, as they do at my company.

side note: i had to add/change the discovery filter to a marco, like this:

{$MSSQL.MULTI.INSTANCE.MATCHAES} = ".*" for match

@Georg311
Copy link

I faced the same issue and reversed engineered the discovery for the instances discovery for our Infrastructure.

$services = Get-Service "mssql$*"|Select-Object -ExpandProperty Name
$data = foreach ($service in $services) {
    [PSCustomObject]@{
		"{#INSTANCES}" = $service
	}
}

$data|ConvertTo-Json
UserParameter=windowssqlinstances.discovery[*],powershell.exe -command "& '%programfiles%\Zabbix\scripts\windowssqlinstances.ps1'"

I don't know if the instance names always match the name of the service, as they do at my company.

side note: i had to add/change the discovery filter to a marco, like this:

{$MSSQL.MULTI.INSTANCE.MATCHAES} = ".*" for match

I was able to reproduce / fix it the way you described

@Georg311
Copy link

I've created a Pull Request Draft, (Only for version 6.0 and Instance)
Please @chi110r check if it is like you added.
If so i can add the other files to the PR.
And maybe afterwards we get somebody to approve it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants