SEVENP / PRTG_SqlAgentStatus

Custom sensor for PRTG that fetches SQL agent status using dbatools
MIT License
0 stars 1 forks source link

Parameter #1

Open PaulDGreen opened 2 years ago

PaulDGreen commented 2 years ago

Hello

When I run the script on my host (where the PRTG Probe & DBATools are installed) I get the error message "The Network Path Was Not Found" after entering my SQL Instance name.

Would you be able to offer any troubleshooting assitance?

Many thanks for providing the script.

LeonarddeR commented 2 years ago

Thanks for your question what happens if you run Get-DbaServerRole -SqlInstance <instance-name> directly from PowerShell?

PaulDGreen commented 2 years ago

Thanks for your reply, I get:

WARNING: [15:07:14][Get-DbaServerRole] Failure | The network path was not found.

LeonarddeR commented 2 years ago

That suggests the issue isn't related to this project. Can you ping the instance e.g. ping <name>?

PaulDGreen commented 2 years ago

Hi Leonard

I can’t ping the SQL Server Instance Name, I don’t think that is possible.

However, I have entered the server name into the PS Script and it has given me information about each of the SQL user roles…

If I put “MYSERVERNAME” into the Parameters field in PRTG, I still get PE127 back.

Thanks very much for your help.

LeonarddeR commented 2 years ago

I believe the syntax should be <servername\instancename>. Unless your instance name is the default name. Does that help?

PaulDGreen commented 2 years ago

Our instance name is the default (MSSQLSERVER).

I tried entering SERVERNAME\MSSQLSERVER into PRTG but continue to get PE127.

LeonarddeR commented 2 years ago

Where does pE127 stand for? Note that for this script to work, the user under which the script is run should have access to the database. It is not possible to provide different credentials unless you'd change the script.

PaulDGreen commented 1 year ago

Hi Leonard

According to PRTG, the error message means:

“An unknown error occurred. The sensor did not return an error message.”

The PRTG Probe runs as “Local System” which has sysadmin rights in SQL Server.

Cheers

Paul Green Head of IT

Whistl Woodview Road, Paignton, TQ4 7SR Mobile: 07876 572753 | Email: @.*** www.whistl.co.ukhttp://www.whistl.co.uk/

From: Leonard de Ruijter @.> Sent: 25 July 2022 10:23 To: SEVENP/PRTG_SqlAgentStatus @.> Cc: Paul Green @.>; Author @.> Subject: [EXTERNAL] Re: [SEVENP/PRTG_SqlAgentStatus] Parameter (Issue #1)

EXTERNAL SENDER

Where does pE127 stand for? Note that for this script to work, the user under which the script is run should have access to the database. It is not possible to provide different credentials unless you'd change the script.

— Reply to this email directly, view it on GitHubhttps://protect-eu.mimecast.com/s/2duzCq74kI156B7fZ_c6M?domain=github.com, or unsubscribehttps://protect-eu.mimecast.com/s/-nKxCr84lcrv3MDCzpNqN?domain=github.com. You are receiving this because you authored the thread.Message ID: @.***>

###################################################################### Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author.

Registered Company Address:

Meridian House Fieldhouse Lane Marlow Buckinghamshire SL7 1TB

Registered Company Number 3783523

This email was scanned and cleared by MailMarshal. ######################################################################