File tree Expand file tree Collapse file tree 10 files changed +249
-81
lines changed Expand file tree Collapse file tree 10 files changed +249
-81
lines changed Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres Alive Plugin
3
+ # check-postgres-alive
4
4
#
5
- # This plugin attempts to login to postgres with provided credentials.
5
+ # DESCRIPTION:
6
6
#
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.
8
28
#
9
- # Released under the same terms as Sensu (the MIT license); see LICENSE
10
- # for details.
11
29
12
30
require 'sensu-plugin/check/cli'
13
31
require 'pg'
Original file line number Diff line number Diff line change 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
+ #
2
28
3
29
require 'sensu-plugin/check/cli'
4
30
require 'pg'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres Connection Metrics
4
- # ===
3
+ # metric-postgres-connections
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
9
6
#
7
+ # This plugin collects postgres connection metrics
10
8
#
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.
13
29
#
14
- # Released under the same terms as Sensu (the MIT license); see LICENSE
15
- # for details.
16
30
17
31
require 'sensu-plugin/metric/cli'
18
32
require 'pg'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres DBSize Metrics
4
- # ===
3
+ # metric-postgres-dbsize
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
9
6
#
7
+ # This plugin collects postgres database size metrics
10
8
#
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.
13
29
#
14
- # Released under the same terms as Sensu (the MIT license); see LICENSE
15
- # for details.
16
30
17
31
require 'sensu-plugin/metric/cli'
18
32
require 'pg'
Original file line number Diff line number Diff line change 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
+ #
2
28
3
29
require 'pg'
4
30
require 'sensu-plugin/metric/cli'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres Locks Metrics
4
- # ===
3
+ # metric-postgres-locks
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
9
6
#
7
+ # This plugin collects postgres database lock metrics
10
8
#
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.
13
29
#
14
- # Released under the same terms as Sensu (the MIT license); see LICENSE
15
- # for details.
16
30
17
31
require 'sensu-plugin/metric/cli'
18
32
require 'pg'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres Stat BGWriter Metrics
4
- # ===
3
+ # metric-postgres-statsbgwriter
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
9
6
#
7
+ # This plugin collects postgres database bgwriter metrics
10
8
#
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.
13
29
#
14
- # Released under the same terms as Sensu (the MIT license); see LICENSE
15
- # for details.
16
30
17
31
require 'sensu-plugin/metric/cli'
18
32
require 'pg'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres Stat DB Metrics
4
- # ===
3
+ # metric-postgres-statsdb
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - PSQL `track_counts` `track_io_timing` for some metrics enabled
9
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
10
6
#
7
+ # This plugin collects postgres database metrics from the pg_stat_database table
11
8
#
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.
14
30
#
15
- # Released under the same terms as Sensu (the MIT license); see LICENSE
16
- # for details.
17
31
18
32
require 'sensu-plugin/metric/cli'
19
33
require 'pg'
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
#
3
- # Postgres StatIO Metrics
4
- # ===
3
+ # metric-postgres-statsio
5
4
#
6
- # Dependencies
7
- # -----------
8
- # - PSQL `track_io_timing` enabled
9
- # - Ruby gem `pg`
5
+ # DESCRIPTION:
10
6
#
7
+ # This plugin collects postgres database IO metrics
11
8
#
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.
14
30
#
15
- # Released under the same terms as Sensu (the MIT license); see LICENSE
16
- # for details.
17
31
18
32
require 'sensu-plugin/metric/cli'
19
33
require 'pg'
You can’t perform that action at this time.
0 commit comments