Skip to content

Instantly share code, notes, and snippets.

@NiceRath
Last active October 15, 2025 09:36
Show Gist options
  • Save NiceRath/9854c979f27774fc64dfaf3d855bde38 to your computer and use it in GitHub Desktop.
Save NiceRath/9854c979f27774fc64dfaf3d855bde38 to your computer and use it in GitHub Desktop.
MSSQL minimal Permissions for Zabbix ODBC Monitoring
For: https://www.zabbix.com/integrations/mssql
# MSSQL PERMISSIONS:
Server-Roles: public
User Mapping:
msdb: db_owner
Securables: (for local Server)
Grant: Connect SQL
Grant: View any definition
Grant: View server state
# SETUP
## APT REPO
See: https://learn.microsoft.com/en-us/linux/packages
## INSTALL
ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
## CONFIG
Add the connection to the /etc/odbc.ini on the Zabbix-Server:
[<DSN>]
Driver=ODBC Driver 17 for SQL Server
Server=<SERVER IP/DNS>,<INSTANCE PORT>
## TEMPLATE MACROs
{$MSSQL.DSN} => the DSN used in the odbc.ini
{$MSSQL.INSTANCE} => instance name like the default 'SQLServer'
{$MSSQL.PORT} => 1433 is default
{$MSSQL.USER} => service-user name
{$MSSQL.PASSWORD} => password for the service-user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment