|
32 | 32 |
|
33 | 33 | class MetricsPostgresQuery < Sensu::Plugin::Metric::CLI::Graphite
|
34 | 34 | option :user,
|
35 |
| - description: 'Postgres User', |
36 |
| - short: '-u USER', |
37 |
| - long: '--user USER' |
| 35 | + description: 'Postgres User', |
| 36 | + short: '-u USER', |
| 37 | + long: '--user USER' |
38 | 38 |
|
39 | 39 | option :password,
|
40 |
| - description: 'Postgres Password', |
41 |
| - short: '-p PASS', |
42 |
| - long: '--password PASS' |
| 40 | + description: 'Postgres Password', |
| 41 | + short: '-p PASS', |
| 42 | + long: '--password PASS' |
43 | 43 |
|
44 | 44 | option :hostname,
|
45 |
| - description: 'Hostname to login to', |
46 |
| - short: '-h HOST', |
47 |
| - long: '--hostname HOST', |
48 |
| - default: 'localhost' |
| 45 | + description: 'Hostname to login to', |
| 46 | + short: '-h HOST', |
| 47 | + long: '--hostname HOST', |
| 48 | + default: 'localhost' |
49 | 49 |
|
50 | 50 | option :port,
|
51 |
| - description: 'Database port', |
52 |
| - short: '-P PORT', |
53 |
| - long: '--port PORT', |
54 |
| - default: 5432 |
| 51 | + description: 'Database port', |
| 52 | + short: '-P PORT', |
| 53 | + long: '--port PORT', |
| 54 | + default: 5432 |
55 | 55 |
|
56 | 56 | option :db,
|
57 |
| - description: 'Database name', |
58 |
| - short: '-d DB', |
59 |
| - long: '--db DB', |
60 |
| - default: 'postgres' |
| 57 | + description: 'Database name', |
| 58 | + short: '-d DB', |
| 59 | + long: '--db DB', |
| 60 | + default: 'postgres' |
61 | 61 |
|
62 | 62 | option :query,
|
63 |
| - description: 'Database query to execute', |
64 |
| - short: '-q QUERY', |
65 |
| - long: '--query QUERY', |
66 |
| - required: true |
| 63 | + description: 'Database query to execute', |
| 64 | + short: '-q QUERY', |
| 65 | + long: '--query QUERY', |
| 66 | + required: true |
67 | 67 |
|
68 | 68 | option :count_tuples,
|
69 |
| - description: 'Count the number of tuples (rows) returned by the query', |
70 |
| - short: '-t', |
71 |
| - long: '--tuples', |
72 |
| - boolean: true, |
73 |
| - default: false |
| 69 | + description: 'Count the number of tuples (rows) returned by the query', |
| 70 | + short: '-t', |
| 71 | + long: '--tuples', |
| 72 | + boolean: true, |
| 73 | + default: false |
74 | 74 |
|
75 | 75 | option :scheme,
|
76 |
| - description: 'Metric naming scheme, text to prepend to metric', |
77 |
| - short: '-s SCHEME', |
78 |
| - long: '--scheme SCHEME', |
79 |
| - default: 'postgres' |
| 76 | + description: 'Metric naming scheme, text to prepend to metric', |
| 77 | + short: '-s SCHEME', |
| 78 | + long: '--scheme SCHEME', |
| 79 | + default: 'postgres' |
80 | 80 |
|
81 | 81 | def run
|
82 | 82 | begin
|
|
0 commit comments