MantasTumenas / Zabbix-template-for-Microsoft-SQL-Server

Zabbix templates for Microsoft SQL Server. Features MS SQL performance counters. MS SQL instance Low Level Discovery. MS SQL database Low Level Discovery. MS SQL agent job Low Level Discovery. MS SQL database mirroring monitoring. MS SQL Always On monitoring. MS SQL Log Shipping monitoring. Supported versions Tested on Microsoft SQL Server 2012, 2014 and 2016. It may work with earlier versions, but some items (with missing performance counters) may be unsupported. For the extensive overview on the performance counters difference between MS SQL 2008 and MS SQL 2012 you can read here (https://blog.dbi-services.com/sql-server-2012-new-perfmon-counters/). Tested on Zabbix 3.4.0. It may work with earlier versions, but some items (for example service.info[service,]) may be unsupported. The template was started on Zabbix 2.4.0 but after each new Zabbix version, objects were modified or new things were added.
GNU General Public License v3.0
50 stars 27 forks source link

Template issues #41

Open nicolaibaralmueller opened 3 years ago

nicolaibaralmueller commented 3 years ago

Hi,

Running Zabbix Server 5.2 with zabbix agent 2 [5.2.7] and followed your guide for installing "Microsoft SQL Server" since that one is newer than instance discovery vs without instance discovery.

Templates and value mapping are imported.

Installed zabbix agent 2 in C:\Program Files\Zabbix\ on the host with subfolder \bin to copy MSSQL folder to since bin folder doesn't exist.

Also added the conf files to main conf. No errors in the log after restarting the agent.

Added Template Microsoft SQL Server DE Tier 3 to the host as a test and can only see 3 discovery rules.

No items or triggers are added. Can't "execute now".

What am I missing here? Shouldn't items be populated automatically?

MantasTumenas commented 3 years ago

Items should be populated automatically. Sometimes, depending on the infrastructure, it takes several hours to discover the items. Is your problem still here?

bleckmeister commented 1 year ago

i have this "problem" as well or maybe i didnt understand what the template does. i have successfully installed the templates (imported) and i started the agent. now when i go to Configuration --> Templates I see the 3 templates (tier 1,2,3) but there are only discovery rules (2,2,3) and no items or triggers. And if i click into discovery i can see 30+ item prototypes etc.

Is this correct?? If yes is there any manual on how to create graphs through item prototypes, because i havent found anything in documentation

MantasTumenas commented 1 year ago

bleckmeister "i have successfully installed the templates (imported) and i started the agent" - this is not enough. Have you copied powershell files? made changes to config files? As in manual - Microsoft SQL Server/Documentation/Template for Microsoft SQL Server.pdf ? For example - have you a correctly working Zabbix server and Zabbix agents on the same server? and You have tested other Zabbix template with an item type “Active” and it works?

bleckmeister commented 1 year ago

@MantasTumenas hey thank you for replying.

The answer is yes. I have a zabbix agent installed on the machine and im monitoring already a lot of other services and performance counters. Also i have copied the scripts in "zabbix agent \ bin \ mssql" folder and i changed the paths in zabbix_agentd \ *.conf files.

e.g `UserParameter=tier3.agent.mssql.discovery,powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\bin\MSSQL\DiscoveryDatabaseAgent\Discovery.mssql.instanceagentname.ps1"

UserParameter=tier3.jobsp5.mssql.discovery,powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\bin\MSSQL\DiscoveryDatabaseAgent\Discovery.mssql.jobname.ps1"

User parameter to get job name. Priority 4. Tier 3 template. UserParameter=tier3.jobsp4.mssql.discovery,powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\bin\MSSQL\DiscoveryDatabaseAgent\Discovery.mssql.jobname.ps1"

User parameter to get job name. Priority 3. Tier 3 template. UserParameter=tier3.jobsp3.mssql.discovery,powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\bin\MSSQL\DiscoveryDatabaseAgent\Discovery.mssql.jobname.ps1"`

Im also using some other templates like [Template Module Windows memory by Zabbix agent] successfully.

Now about the item type. All the item types im using have the Zabbix Agent indication and not Zabbix Agent (Active) so i can't confirm that part.

MantasTumenas commented 1 year ago

Due to a work load I will look into it only on next Sunday. Good enough?

bleckmeister commented 1 year ago

Thank you for your response. To help you more if i go to Administration --> Queue i see the items of zabbix agent (Active) in queue. There is something with the discovery i believe

MantasTumenas commented 1 year ago

Write me an email to coordinate short online session. Will be much faster

bleckmeister commented 1 year ago

@MantasTumenas Thank you for your reply. I wnet through the configuration from scratched and documented the steps on an excel. I was able to find the culprit. my hostname in zabbix server was ROME1.BANKXXXXX.GR and in config file was ROME1.BANKXXXX.local (the old domain) so it was a misconfiguration on my part.

Im so sorry for the inconvenience. So this is Case solved for me