Skip to content

Commit c76966e

Browse files
committed
Merge pull request #4 from eheydrick/headers
Standardize headers
2 parents a774627 + 8ed2e39 commit c76966e

10 files changed

+249
-81
lines changed

bin/check-postgres-alive.rb

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres Alive Plugin
3+
# check-postgres-alive
44
#
5-
# This plugin attempts to login to postgres with provided credentials.
5+
# DESCRIPTION:
66
#
7-
# Copyright 2012 Lewis Preson & Tom Bassindale
7+
# This plugin attempts to login to postgres with provided credentials.
8+
#
9+
# OUTPUT:
10+
# plain text
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./check-postgres-alive.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Copyright (c) 2012 Lewis Preson & Tom Bassindale
26+
# Released under the same terms as Sensu (the MIT license); see LICENSE
27+
# for details.
828
#
9-
# Released under the same terms as Sensu (the MIT license); see LICENSE
10-
# for details.
1129

1230
require 'sensu-plugin/check/cli'
1331
require 'pg'

bin/check-postgres-replication.rb

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
2+
#
3+
# check-postgres-replication
4+
#
5+
# DESCRIPTION:
6+
#
7+
# This plugin checks postgresql replication lag
8+
#
9+
# OUTPUT:
10+
# plain text
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./check-postgres-replication.rb -m master_host -s slave_host -d db -u db_user -p db_pass -w warn_threshold -c crit_threshold
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Released under the same terms as Sensu (the MIT license); see LICENSE
26+
# for details.
27+
#
228

329
require 'sensu-plugin/check/cli'
430
require 'pg'

bin/metric-postgres-connections.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres Connection Metrics
4-
# ===
3+
# metric-postgres-connections
54
#
6-
# Dependencies
7-
# -----------
8-
# - Ruby gem `pg`
5+
# DESCRIPTION:
96
#
7+
# This plugin collects postgres connection metrics
108
#
11-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
12-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-connections.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
26+
# Author Gilles Devaux <gilles.devaux@gmail.com>
27+
# Released under the same terms as Sensu (the MIT license); see LICENSE
28+
# for details.
1329
#
14-
# Released under the same terms as Sensu (the MIT license); see LICENSE
15-
# for details.
1630

1731
require 'sensu-plugin/metric/cli'
1832
require 'pg'

bin/metric-postgres-dbsize.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres DBSize Metrics
4-
# ===
3+
# metric-postgres-dbsize
54
#
6-
# Dependencies
7-
# -----------
8-
# - Ruby gem `pg`
5+
# DESCRIPTION:
96
#
7+
# This plugin collects postgres database size metrics
108
#
11-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
12-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-dbsize.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
26+
# Author Gilles Devaux <gilles.devaux@gmail.com>
27+
# Released under the same terms as Sensu (the MIT license); see LICENSE
28+
# for details.
1329
#
14-
# Released under the same terms as Sensu (the MIT license); see LICENSE
15-
# for details.
1630

1731
require 'sensu-plugin/metric/cli'
1832
require 'pg'

bin/metric-postgres-graphite.rb

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
2+
#
3+
# metric-postgres-graphite
4+
#
5+
# DESCRIPTION:
6+
#
7+
# This plugin collects postgres replication lag metrics
8+
#
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-graphite.rb -m master_host -s slave_host -d db -u db_user -p db_pass
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Released under the same terms as Sensu (the MIT license); see LICENSE
26+
# for details.
27+
#
228

329
require 'pg'
430
require 'sensu-plugin/metric/cli'

bin/metric-postgres-locks.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres Locks Metrics
4-
# ===
3+
# metric-postgres-locks
54
#
6-
# Dependencies
7-
# -----------
8-
# - Ruby gem `pg`
5+
# DESCRIPTION:
96
#
7+
# This plugin collects postgres database lock metrics
108
#
11-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
12-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-locks.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
26+
# Author Gilles Devaux <gilles.devaux@gmail.com>
27+
# Released under the same terms as Sensu (the MIT license); see LICENSE
28+
# for details.
1329
#
14-
# Released under the same terms as Sensu (the MIT license); see LICENSE
15-
# for details.
1630

1731
require 'sensu-plugin/metric/cli'
1832
require 'pg'

bin/metric-postgres-statsbgwriter.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres Stat BGWriter Metrics
4-
# ===
3+
# metric-postgres-statsbgwriter
54
#
6-
# Dependencies
7-
# -----------
8-
# - Ruby gem `pg`
5+
# DESCRIPTION:
96
#
7+
# This plugin collects postgres database bgwriter metrics
108
#
11-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
12-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-statsbgwriter.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
#
24+
# LICENSE:
25+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
26+
# Author Gilles Devaux <gilles.devaux@gmail.com>
27+
# Released under the same terms as Sensu (the MIT license); see LICENSE
28+
# for details.
1329
#
14-
# Released under the same terms as Sensu (the MIT license); see LICENSE
15-
# for details.
1630

1731
require 'sensu-plugin/metric/cli'
1832
require 'pg'

bin/metric-postgres-statsdb.rb

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres Stat DB Metrics
4-
# ===
3+
# metric-postgres-statsdb
54
#
6-
# Dependencies
7-
# -----------
8-
# - PSQL `track_counts` `track_io_timing` for some metrics enabled
9-
# - Ruby gem `pg`
5+
# DESCRIPTION:
106
#
7+
# This plugin collects postgres database metrics from the pg_stat_database table
118
#
12-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
13-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-statsdb.rb -u db_user -p db_pass -h db_host -d db
21+
#
22+
# NOTES:
23+
# Requires PSQL `track_counts` `track_io_timing` for some metrics enabled
24+
#
25+
# LICENSE:
26+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
27+
# Author Gilles Devaux <gilles.devaux@gmail.com>
28+
# Released under the same terms as Sensu (the MIT license); see LICENSE
29+
# for details.
1430
#
15-
# Released under the same terms as Sensu (the MIT license); see LICENSE
16-
# for details.
1731

1832
require 'sensu-plugin/metric/cli'
1933
require 'pg'

bin/metric-postgres-statsio.rb

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
#!/usr/bin/env ruby
1+
#! /usr/bin/env ruby
22
#
3-
# Postgres StatIO Metrics
4-
# ===
3+
# metric-postgres-statsio
54
#
6-
# Dependencies
7-
# -----------
8-
# - PSQL `track_io_timing` enabled
9-
# - Ruby gem `pg`
5+
# DESCRIPTION:
106
#
7+
# This plugin collects postgres database IO metrics
118
#
12-
# Copyright 2012 Kwarter, Inc <platforms@kwarter.com>
13-
# Author Gilles Devaux <gilles.devaux@gmail.com>
9+
# OUTPUT:
10+
# metric data
11+
#
12+
# PLATFORMS:
13+
# Linux
14+
#
15+
# DEPENDENCIES:
16+
# gem: sensu-plugin
17+
# gem: pg
18+
#
19+
# USAGE:
20+
# ./metric-postgres-statsio.rb -u db_user -p db_pass -h db_host -d db -s scope
21+
#
22+
# NOTES:
23+
# Requires PSQL `track_io_timing` enabled
24+
#
25+
# LICENSE:
26+
# Copyright (c) 2012 Kwarter, Inc <platforms@kwarter.com>
27+
# Author Gilles Devaux <gilles.devaux@gmail.com>
28+
# Released under the same terms as Sensu (the MIT license); see LICENSE
29+
# for details.
1430
#
15-
# Released under the same terms as Sensu (the MIT license); see LICENSE
16-
# for details.
1731

1832
require 'sensu-plugin/metric/cli'
1933
require 'pg'

0 commit comments

Comments
 (0)