SQL Monitor 13

New-SqlMonitorPostgreSql

Creates a new temporary object that holds information about a PostgreSql instance.

Syntax

New-SqlMonitorPostgreSql [-FullName] <string> [-BaseMonitor] <BaseMonitor> [[-Alias] <string>] [-UserName] <string> [-Password] <string> [-Port] <int> [<CommonParameters>]

Description

The New-SqlMonitorPostgreSql cmdlet creates a new temporary object that holds information about a PostgreSql instance. The returned object needs to be passed to Add-SqlMonitorMonitoredObject together with a host info, as it does not add anything to SQL Monitor on its own.

Parameters

-FullName <String>

The address of the monitored object e.g. "localhost".

Aliases None
Required? true
Position? 1
Default Value None
Accept Pipeline Input True (ByValue)
Accept Wildcard Characters false

-BaseMonitor <BaseMonitor>

The base monitor to add the monitored object to. For more informatiom, see https://documentation.red-gate.com/sm/api/powershell-cmdlet-reference/get-sqlmonitorbasemonitor.

Aliases None
Required? true
Position? 2
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Alias <String>

Alias (display name)

Aliases None
Required? false
Position? 3
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-UserName <String>

Username to connect to PostgreSql instance with.

Aliases None
Required? true
Position? 4
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Password <String>

Password to connect to PostgreSql instance with.

Aliases None
Required? true
Position? 5
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Port <Int32>

PostgreSql port number.

Aliases None
Required? true
Position? 6
Default Value 0
Accept Pipeline Input False
Accept Wildcard Characters false

-ProgressAction <ActionPreference>

{{ Fill ProgressAction Description }}

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.
    You cannot pipe input to this cmdlet.

Examples

-------------------------- EXAMPLE 1 --------------------------

$instance = New-SqlMonitorPostgreSql -FullName "localhost" -BaseMonitor $BaseMonitor -UserName "pg_username" -Password "pg_pass" -Port 5432
$server = New-SqlMonitorLinuxHost -HostName "localhost" -BaseMonitor $BaseMonitor -SshUserName "ssh_user" -SshPassword "ssh_pass"
$server, $instance | Add-SqlMonitorMonitoredObject


Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?