{"id":1602,"date":"2017-12-18T09:48:12","date_gmt":"2017-12-18T09:48:12","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=1602"},"modified":"2020-05-11T13:46:25","modified_gmt":"2020-05-11T11:46:25","slug":"sql-server-performance-plugin","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/sql-server-performance-plugin\/","title":{"rendered":"SQL Server performance plugin"},"content":{"rendered":"<h1>SQL Server performance plugin<\/h1>\n<p class=\"description_pui\">This is a vbs plugin to fetch the performance metrics from a SQL Server.<\/p>\n<p>To install it:<br \/>\n1. Create the directory &#8220;%Program Files%pandora_agentplugins&#8221; if needed.<br \/>\n2. Download the file &#8220;sqlserver_plugin.vbs&#8221;.<br \/>\n3. Copy it to the previosuly created plugins directory.<\/p>\n<p>To use it you need a sql server user with at least &#8220;VIEW SERVER STATE&#8221; privileges, for that I create a user with only this privilege:<\/p>\n<pre>SQLServer&gt; CREATE LOGIN [(user)]\r\nSQLServer&gt; WITH PASSWORD=N'(pass)',\r\nSQLServer&gt; DEFAULT_DATABASE=[master],\r\nSQLServer&gt; DEFAULT_LANGUAGE=[us_english],\r\nSQLServer&gt; CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF\r\nSQLServer&gt; GRANT VIEW SERVER STATE to [(user)]\r\n<\/pre>\n<p>NOTE: NEVER use an account with full privileges.<\/p>\n<p>Also check the driver availability on the system via the &#8220;Data Sources (ODBC)&#8221; section of your windows &#8220;Administrative Tools&#8221;.<\/p>\n<p>Then just call it from the config file of your agent with the following line:<\/p>\n<pre>\"module_plugin memory_plugin &lt;user&gt; &lt;password&gt; &lt;host&gt; &lt;driver&gt;\"\r\n<\/pre>\n<p>NOTE: if &lt;driver&gt; has white spaces in its name it must be double-enquoted.<\/p>\n<p>For more plugin options or change warning and critical levels see its code.<\/p>\n<h2>Files:<\/h2>\n<p><a href=\"\/library\/files_repository\/1366976393.magulinb.sqlserver_plugin.vbs\" rel=\"nofollow\">sqlserver_plugin.vbs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server performance plugin This is a vbs plugin to fetch the performance metrics from a SQL Server. To install it: 1. Create the directory &#8220;%Program Files%pandora_agentplugins&#8221; if needed. 2. Download the file &#8220;sqlserver_plugin.vbs&#8221;. 3. Copy it to the previosuly created plugins directory. To use it you need a sql server user with at least [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[24],"tags":[564],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1602"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=1602"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1602\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=1602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=1602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=1602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}