riemann-tools 0.2.13 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +5 -5
  2. data/.docker/Dockerfile +7 -0
  3. data/.docker/publish.sh +35 -0
  4. data/.github/dependabot.yml +11 -0
  5. data/.github/workflows/ci.yml +42 -0
  6. data/.github/workflows/codeql-analysis.yml +72 -0
  7. data/.gitignore +6 -0
  8. data/.rspec +2 -0
  9. data/.rubocop.yml +32 -0
  10. data/.travis.yml +31 -0
  11. data/CHANGELOG.md +422 -0
  12. data/Gemfile +6 -0
  13. data/ISSUE_TEMPLATE.md +15 -0
  14. data/README.markdown +14 -15
  15. data/Rakefile +23 -0
  16. data/SECURITY.md +42 -0
  17. data/bin/riemann-apache-status +92 -77
  18. data/bin/riemann-bench +54 -48
  19. data/bin/riemann-cloudant +44 -39
  20. data/bin/riemann-consul +82 -75
  21. data/bin/riemann-dir-files-count +53 -46
  22. data/bin/riemann-dir-space +53 -46
  23. data/bin/riemann-diskstats +78 -74
  24. data/bin/riemann-fd +68 -47
  25. data/bin/riemann-freeswitch +108 -102
  26. data/bin/riemann-haproxy +46 -39
  27. data/bin/riemann-health +4 -335
  28. data/bin/riemann-kvminstance +18 -12
  29. data/bin/riemann-memcached +35 -28
  30. data/bin/riemann-net +4 -103
  31. data/bin/riemann-nginx-status +74 -66
  32. data/bin/riemann-ntp +4 -32
  33. data/bin/riemann-portcheck +40 -30
  34. data/bin/riemann-proc +96 -89
  35. data/bin/riemann-varnish +51 -44
  36. data/bin/riemann-zookeeper +38 -33
  37. data/lib/riemann/tools/health.rb +347 -0
  38. data/lib/riemann/tools/net.rb +104 -0
  39. data/lib/riemann/tools/ntp.rb +41 -0
  40. data/lib/riemann/tools/utils.rb +17 -0
  41. data/lib/riemann/tools/version.rb +7 -0
  42. data/lib/riemann/tools.rb +40 -33
  43. data/riemann-tools.gemspec +42 -0
  44. data/tools/riemann-aws/LICENSE +21 -0
  45. data/tools/riemann-aws/README.md +54 -0
  46. data/tools/riemann-aws/Rakefile +37 -0
  47. data/tools/riemann-aws/bin/riemann-aws-billing +93 -0
  48. data/tools/riemann-aws/bin/riemann-aws-rds-status +68 -0
  49. data/tools/riemann-aws/bin/riemann-aws-sqs-status +50 -0
  50. data/tools/riemann-aws/bin/riemann-aws-status +83 -0
  51. data/tools/riemann-aws/bin/riemann-elb-metrics +168 -0
  52. data/tools/riemann-aws/bin/riemann-s3-list +87 -0
  53. data/tools/riemann-aws/bin/riemann-s3-status +102 -0
  54. data/tools/riemann-chronos/LICENSE +21 -0
  55. data/tools/riemann-chronos/README.md +10 -0
  56. data/tools/riemann-chronos/Rakefile +37 -0
  57. data/tools/riemann-chronos/bin/riemann-chronos +161 -0
  58. data/tools/riemann-docker/LICENSE +21 -0
  59. data/tools/riemann-docker/README.md +10 -0
  60. data/tools/riemann-docker/Rakefile +36 -0
  61. data/tools/riemann-docker/bin/riemann-docker +206 -0
  62. data/tools/riemann-elasticsearch/LICENSE +21 -0
  63. data/tools/riemann-elasticsearch/README.md +10 -0
  64. data/tools/riemann-elasticsearch/Rakefile +37 -0
  65. data/tools/riemann-elasticsearch/bin/riemann-elasticsearch +174 -0
  66. data/tools/riemann-marathon/LICENSE +21 -0
  67. data/tools/riemann-marathon/README.md +10 -0
  68. data/tools/riemann-marathon/Rakefile +37 -0
  69. data/tools/riemann-marathon/bin/riemann-marathon +163 -0
  70. data/tools/riemann-mesos/LICENSE +21 -0
  71. data/tools/riemann-mesos/README.md +10 -0
  72. data/tools/riemann-mesos/Rakefile +37 -0
  73. data/tools/riemann-mesos/bin/riemann-mesos +146 -0
  74. data/tools/riemann-munin/LICENSE +21 -0
  75. data/tools/riemann-munin/README.md +10 -0
  76. data/tools/riemann-munin/Rakefile +36 -0
  77. data/tools/riemann-munin/bin/riemann-munin +43 -0
  78. data/tools/riemann-rabbitmq/LICENSE +21 -0
  79. data/tools/riemann-rabbitmq/README.md +10 -0
  80. data/tools/riemann-rabbitmq/Rakefile +37 -0
  81. data/tools/riemann-rabbitmq/bin/riemann-rabbitmq +273 -0
  82. data/tools/riemann-riak/LICENSE +21 -0
  83. data/tools/riemann-riak/README.md +10 -0
  84. data/tools/riemann-riak/Rakefile +36 -0
  85. data/tools/riemann-riak/bin/riemann-riak +323 -0
  86. data/tools/riemann-riak/bin/riemann-riak-keys +13 -0
  87. data/tools/riemann-riak/bin/riemann-riak-ring +9 -0
  88. data/tools/riemann-riak/riak_status/key_count.erl +13 -0
  89. data/tools/riemann-riak/riak_status/riak_status.rb +152 -0
  90. data/tools/riemann-riak/riak_status/ringready.erl +9 -0
  91. metadata +195 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 524cc2711592ff6612b4bcde6b96ab3fa11ae537
4
- data.tar.gz: b1091049d8dac7ac940bc17f08484b4c4466e3f1
2
+ SHA256:
3
+ metadata.gz: 32ac83ea47b36e6632eea36cb430b0c9547b0aaecc3be6b7e10098c8a4c8c5fe
4
+ data.tar.gz: 4227da1e9388eb3d2b831071db0b21132b51d834167ddfa54c57faa57360672b
5
5
  SHA512:
6
- metadata.gz: ba5628dc40a128aed32394cdce2a8a6a63506c6eeb488d736ab1fa678c34fb209f260ff3dbfcc1c08de5c7cd35fcef57d38bb0058993fa7af417a8125a2c5555
7
- data.tar.gz: 7c2db71785ca6e9f4effd8ef383156a9baf3337e6b9dc9ddd293b01c2578e4b0faf8f5dc1daeebd998f219cd5561b88283e29c04edbcb0f2f4eabad090a8b8ab
6
+ metadata.gz: 4a218c867ea61f0cb64f581e386861f22a28fcf9a8ab24870ceb20d7239a0224e33df98a0364b513a984d2317695a482257039367ca65eb249f6f8e625b24ba1
7
+ data.tar.gz: e8310afa539023c8dffb2e3ed3ccf91ebc703ff3939a730823b0001ffa75e9ac28e61f0a014bd8582880900566d6bf2f633e6119d5dd662b1ce97b399e052e66
@@ -0,0 +1,7 @@
1
+ FROM ruby:2.5-alpine3.8
2
+ RUN apk add --update alpine-sdk
3
+
4
+ ARG RUBY_GEMS="riemann-tools"
5
+ RUN gem install --verbose --no-rdoc --no-ri $RUBY_GEMS
6
+
7
+ CMD ["riemann-health", "--help"]
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null && pwd)"
5
+ IMAGE_PREFIX=${IMAGE_PREFIX:-"riemannio/"}
6
+
7
+ function getVersion {
8
+ local path=$ROOT_DIR
9
+ [ -z "$1" ] || path="$ROOT_DIR/tools/$1"
10
+ cat $path/Rakefile.rb | grep s.version | grep -oE '[0-9.]{5,}'
11
+ }
12
+
13
+ function getPackageList {
14
+ echo -n "riemann-tools:`getVersion`"
15
+ [ -z "$1" ] || echo -n " $1:`getVersion $1`"
16
+ }
17
+
18
+ # Need to log in before we can push.
19
+ [ -z "$DOCKER_USER" ] && echo "DOCKER_USER is not set" && exit 1
20
+ [ -z "$DOCKER_PASS" ] && echo "DOCKER_PASS is not set" && exit 1
21
+ docker login -u $DOCKER_USER -p $DOCKER_PASS
22
+
23
+ tool=${EXTRA_TOOL:-""}
24
+ version=`getVersion $tool`
25
+ name=${IMAGE_PREFIX}riemann-tools${tool/riemann/}
26
+
27
+ echo "==> Publishing $name:$version and :latest"
28
+ docker pull $name:latest
29
+ docker build --cache-from $name:latest \
30
+ --build-arg RUBY_GEMS="`getPackageList $tool`" \
31
+ -t $name:$version -t $name:latest \
32
+ $ROOT_DIR/.docker
33
+
34
+ docker push $name:$version
35
+ docker push $name:latest
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "daily"
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - name: Setup ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: '2.7'
21
+ bundler-cache: true
22
+ - name: Run rubocop
23
+ run: bundle exec rubocop
24
+ test:
25
+ needs: lint
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ matrix:
29
+ ruby-version:
30
+ - 2.6
31
+ - 2.7
32
+ - 3.0
33
+ - 3.1
34
+ steps:
35
+ - uses: actions/checkout@v2
36
+ - name: Setup Ruby
37
+ uses: ruby/setup-ruby@v1
38
+ with:
39
+ ruby-version: ${{ matrix.ruby-version }}
40
+ bundler-cache: true
41
+ - name: Run the test suite
42
+ run: bundle exec rspec
@@ -0,0 +1,72 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "main" ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "main" ]
20
+ schedule:
21
+ - cron: '27 16 * * 6'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+
52
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+ # queries: security-extended,security-and-quality
54
+
55
+
56
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
+ # If this step fails, then you should remove it and run the build manually (see below)
58
+ - name: Autobuild
59
+ uses: github/codeql-action/autobuild@v2
60
+
61
+ # ℹ️ Command-line programs to run using the OS shell.
62
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
64
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
65
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
+
67
+ # - run: |
68
+ # echo "Run, Build Application using script"
69
+ # ./location_of_script_within_repo/buildscript.sh
70
+
71
+ - name: Perform CodeQL Analysis
72
+ uses: github/codeql-action/analyze@v2
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ pkg/
2
+ ._*
3
+ *~
4
+ .DS_Store
5
+ .*.swp
6
+ *.log
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --require spec_helper
2
+ --format doc
data/.rubocop.yml ADDED
@@ -0,0 +1,32 @@
1
+ ---
2
+ Layout/HashAlignment:
3
+ EnforcedHashRocketStyle: table
4
+ Layout/LineLength:
5
+ Enabled: false
6
+ Metrics/AbcSize:
7
+ Enabled: false
8
+ Metrics/BlockLength:
9
+ Enabled: false
10
+ Metrics/ClassLength:
11
+ Enabled: false
12
+ Metrics/CyclomaticComplexity:
13
+ Enabled: false
14
+ Metrics/MethodLength:
15
+ Enabled: false
16
+ Metrics/ParameterLists:
17
+ Enabled: false
18
+ Metrics/PerceivedComplexity:
19
+ Enabled: false
20
+ Naming/MethodParameterName:
21
+ AllowedNames:
22
+ - az # availability zone
23
+ - id
24
+ - lb # load balancer
25
+ Style/Documentation:
26
+ Enabled: false
27
+ Style/TrailingCommaInArguments:
28
+ EnforcedStyleForMultiline: consistent_comma
29
+ Style/TrailingCommaInArrayLiteral:
30
+ EnforcedStyleForMultiline: consistent_comma
31
+ Style/TrailingCommaInHashLiteral:
32
+ EnforcedStyleForMultiline: consistent_comma
data/.travis.yml ADDED
@@ -0,0 +1,31 @@
1
+ sudo: required
2
+
3
+ services:
4
+ - docker
5
+
6
+ addons:
7
+ apt:
8
+ packages:
9
+ - docker-ce
10
+
11
+ env:
12
+ - EXTRA_TOOL=
13
+ - EXTRA_TOOL=riemann-aws
14
+ - EXTRA_TOOL=riemann-chronos
15
+ - EXTRA_TOOL=riemann-docker
16
+ - EXTRA_TOOL=riemann-elasticsearch
17
+ - EXTRA_TOOL=riemann-marathon
18
+ - EXTRA_TOOL=riemann-mesos
19
+ - EXTRA_TOOL=riemann-munin
20
+ - EXTRA_TOOL=riemann-rabbitmq
21
+ - EXTRA_TOOL=riemann-riak
22
+
23
+ before_script:
24
+ - docker version
25
+
26
+ script:
27
+ - .docker/publish.sh
28
+
29
+ branches:
30
+ only:
31
+ - master