File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313# The postgres port number
1414# $username
1515# The username for the datadog user
16+ # $ssl
17+ # Boolean to enable SSL
1618# $use_psycopg2
1719# Boolean to flag connecting to postgres with psycopg2 instead of pg8000.
1820# Warning, psycopg2 doesn't support ssl mode.
3638# dbname => 'postgres'
3739# username => 'datadog',
3840# password => 'some_pass',
41+ # ssl => false,
3942# custom_metrics => {
4043# a_custom_query => {
4144# query => "select tag_column, %s from table",
5760 $dbname = ' postgres' ,
5861 $port = ' 5432' ,
5962 $username = ' datadog' ,
63+ $ssl = false ,
6064 $use_psycopg2 = false ,
6165 $tags = [],
6266 $tables = [],
8286 ' dbname' => $dbname ,
8387 ' port' => $port ,
8488 ' username' => $username ,
89+ ' ssl' => $ssl ,
8590 ' use_psycopg2' => $use_psycopg2 ,
8691 ' tags' => $tags ,
8792 ' tables' => $tables ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ instances:
66# username: my_username
77# password: my_password
88# dbname: db_name
9+ # ssl: false
910# use_psycopg2: false # Force using psycogp2 instead of pg8000 to connect. WARNING: psycopg2 doesn't support ssl mode.
1011# tags:
1112# - optional_tag1
@@ -17,6 +18,9 @@ instances:
1718 username: <%= instance['username'] %>
1819 password: <%= instance['password'] %>
1920 dbname: <%= instance['dbname'] %>
21+ <% if instance['ssl'] == true -%>
22+ ssl: true
23+ <% end -%>
2024<% if instance['use_psycopg2'] == true -%>
2125 use_psycopg2: true
2226<% end -%>
You can’t perform that action at this time.
0 commit comments