Giter Club home page Giter Club logo

riemann-tools's Introduction

Riemann Tools

Tiny programs to submit events to Riemann.

Riemann-health, for example, submits events about the current CPU, load, memory, and disk use. Also available is riemann-bench, which submits randomly distributed metrics for load testing.

Gem Version CI

Get started

gem install riemann-tools
riemann-health --host my.riemann.server

Riemann-tools programs

This repository contains a number of different programs. Some of them ship with the riemann-tools gem, including:

  • riemann-apache-status - Apache monitoring.
  • riemann-dir-files-count - File counts.
  • riemann-freeswitch - FreeSwitch monitoring.
  • riemann-memcached - Monitor Memcache.
  • riemann-proc - Linux process monitoring.
  • riemann-bench - Load testing for Riemann.
  • riemann-dir-space - Directory space monitoring.
  • riemann-haproxy - Monitor HAProxy.
  • riemann-net - Network interface monitoring.
  • riemann-varnish - Monitor Varnish.
  • riemann-cloudant - Cloudant monitoring.
  • riemann-diskstats - Disk statistics.
  • riemann-health - General CPU, memory, disk and load monitoring.
  • riemann-nginx-status - Monitor Nginx.
  • riemann-zookeeper - Monitor Zookeeper.
  • riemann-consul - Monitor Consul.
  • riemann-fd - Linux file descriptor use.
  • riemann-kvminstance - Monitor KVM instances.
  • riemann-ntp - Monitor NTP.
  • riemann-portcheck - Monitor open TCP ports.
  • riemann-http-check - Monitor reachability of HTTP(S) resources.

Also contained in the repository are a number of stand-alone monitoring tools, which are shipped as separate gems.

Riemann stand-alone tools

Use these tools by installing their individual gems, usually named for the specific tool, for example, to install the AWS tools:

gem install riemann-aws
  • riemann-aws - Monitor various AWS services.
  • riemann-elasticsearch - Monitor Elasticsearch.
  • riemann-mesos - Monitor Mesos.
  • riemann-rabbitmq - Monitor RabbitMQ.
  • riemann-docker - Monitor Docker.
  • riemann-marathon - Monitor Marathon.
  • riemann-munin - Monitor Munin.
  • riemann-riak - Monitor Riak.
  • riemann-chronos - Monitor Chronos.

There are also a number of additional, stand-alone tools, contained in the Riemann GitHub account.

Docker Images

You can find Docker images for the tools here.

License

The MIT License

Copyright (c) 2011-2022 Kyle Kingsbury

riemann-tools's People

Contributors

ainsleyc avatar algernon avatar anho avatar aphyr avatar aterreno avatar beanow avatar bhuwan avatar bipthelin avatar dch avatar default50 avatar dmichel1 avatar fborgnia avatar gfv avatar goblin avatar gorandev avatar gsandie avatar henrikno avatar inkel avatar iramello avatar jamtur01 avatar ktf avatar md5 avatar mpalmer avatar pdericson avatar perezd avatar sdx23 avatar shanielh avatar smortex avatar tcrayford avatar wjimenez5271 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riemann-tools's Issues

Riemann-health not working on Ubuntu 14.10 x64 vmlinuz-3.16.0-28-generic

Hi there,
just provisioned a new Digital Ocean machine to monitor with Riemann-health (v 0.2.5), but I get a (parsing?) error:

NoMethodError undefined method `map' for #<Riemann::Event:0x000000011ab930>
/var/lib/gems/2.1.0/gems/riemann-client-0.2.3/lib/riemann/event.rb:179:in `initialize'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:287:in `new'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:287:in `block (2 levels) in assign'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:286:in `map'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:286:in `block in assign'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:262:in `each'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:262:in `assign'
/var/lib/gems/2.1.0/gems/beefcake-1.1.0.pre1/lib/beefcake.rb:242:in `initialize'
/var/lib/gems/2.1.0/gems/riemann-client-0.2.3/lib/riemann/client.rb:60:in `new'
/var/lib/gems/2.1.0/gems/riemann-client-0.2.3/lib/riemann/client.rb:60:in `<<'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/lib/riemann/tools.rb:69:in `report'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:65:in `alert'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:97:in `report_pct'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:146:in `linux_memory'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:269:in `call'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:269:in `tick'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/lib/riemann/tools.rb:94:in `block in run'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/lib/riemann/tools.rb:92:in `loop'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/lib/riemann/tools.rb:92:in `run'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/lib/riemann/tools.rb:9:in `run'
/var/lib/gems/2.1.0/gems/riemann-tools-0.2.5/bin/riemann-health:280:in `<top (required)>'
/usr/local/bin/riemann-health:23:in `load'
/usr/local/bin/riemann-health:23:in `<main>'

My /proc/cpuinfo looks like this:


cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2399.998
cache size  : 4096 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4799.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2399.998
cache size  : 4096 KB
physical id : 1
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4799.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2399.998
cache size  : 4096 KB
physical id : 2
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4799.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2399.998
cache size  : 4096 KB
physical id : 3
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4799.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48

and

 cat /proc/meminfo
MemTotal:        8176324 kB
MemFree:         7780660 kB
MemAvailable:    7867088 kB
Buffers:          143664 kB
Cached:            68108 kB
SwapCached:            0 kB
Active:           208076 kB
Inactive:          24996 kB
Active(anon):      21388 kB
Inactive(anon):      256 kB
Active(file):     186688 kB
Inactive(file):    24740 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                68 kB
Writeback:             0 kB
AnonPages:         21316 kB
Mapped:            12348 kB
Shmem:               328 kB
Slab:             101452 kB
SReclaimable:      87852 kB
SUnreclaim:        13600 kB
KernelStack:        1760 kB
PageTables:         2884 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4088160 kB
Committed_AS:      71440 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       16804 kB
VmallocChunk:   34359711340 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       34804 kB
DirectMap2M:     8353792 kB

riemann-riak error when adding tag

When trying to set a tag via the command line (--tag), riemann-riak fails with the following error: RuntimeError can't modify frozen String

Full stacktrace:

/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `force_encoding'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `append_string'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:13:in `append'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:102:in `block in encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:94:in `block in encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:40:in `block in send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:57:in `block in with_connection'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:54:in `synchronize'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:54:in `with_connection'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:39:in `send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client.rb:86:in `send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client.rb:49:in `<<'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:71:in `block in report'
/Users/daniel/.rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:70:in `report'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:187:in `check_stats'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:231:in `tick'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:90:in `block in run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:88:in `loop'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:88:in `run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:11:in `run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:237:in `<top (required)>'
/Users/daniel/.gem/ruby/2.0.0/bin/riemann-riak:23:in `load'
/Users/daniel/.gem/ruby/2.0.0/bin/riemann-riak:23:in `<main>'

I tried this using ruby 2.0.0p247 and ruby 1.9.3p448.

Edit 11:53:

The same thing is happening with riemann-redis, too. Did not check more tools.

Riemann riak tools spins up 2 erlang vms with the same node name simulataneously, causing one to fail

I am seeing this error message repeatedly on my riak cluster. I think this is because the 2 riak health checks are started simultaneously, and the nodes conflict. I could submit a PR that makes ringready always use the command line tool. What do you think?

At Fri Dec 13 20:05:12 GMT+00:00 2013
riaknode1.example.com riak ring warning ()
Tags: []

{error_logger,{{2013,12,13},{20,5,11}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}
{error_logger,{{2013,12,13},{20,5,11}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.19.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[#Port<0.53>,<0.16.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,24},{reductions,504}],[]]}
{error_logger,{{2013,12,13},{20,5,11}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['[email protected]',longnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2013,12,13},{20,5,11}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2013,12,13},{20,5,11}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Riemann health stopped updating disk usage

I just noticed that one of my machine's disk usage was being reported by riemann-health at 50%, even though it was actually at 69%. It was still sending events regularly, but the metric was wrong.

I restarted the riemann-health daemon, and the metric updated to the correct number.

Elasticsearch tool gives error NoMethodError undefined method `URI'

Fresh gem install on a data node with ES 1.1.1.

Command:

riemann-elasticsearch -h x.x.x.y # riemann server
NoMethodError undefined method `URI' for #<Riemann::Tools::Elasticsearch:0x0000000103a1f0>
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/bin/riemann-elasticsearch:42:in `tick'
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/lib/riemann/tools.rb:101:in `block in run'
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/lib/riemann/tools.rb:99:in `loop'
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/lib/riemann/tools.rb:99:in `run'
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/lib/riemann/tools.rb:11:in `run'
/usr/local/share/ruby/gems/2.0/gems/riemann-tools-0.2.1/bin/riemann-elasticsearch:86:in `<top (required)>'
/usr/local/bin/riemann-elasticsearch:23:in `load'
/usr/local/bin/riemann-elasticsearch:23:in `<main>'

Disabled checks are hard to discover

When using a riemann tool that feature multiple checks, it is not easy to discover new checks that are not enabled by default.

romain@desktop-fln40kq ~/Projects/riemann-tools % bundle exec bin/riemann-health --help         
Options:
  -h, --host=<s>                       Riemann host (default: 127.0.0.1)
  -p, --port=<i>                       Riemann port (default: 5555)
  -e, --event-host=<s>                 Event hostname
  -i, --interval=<i>                   Seconds between updates (default: 5)
  -t, --tag=<s>                        Tag to add to events
  -l, --ttl=<i>                        TTL for events
  -a, --attribute=<s>                  Attribute to add to the event
  -m, --timeout=<i>                    Timeout (in seconds) when waiting for acknowledgements (default: 30)
  -c, --tcp, --no-tcp                  Use TCP transport instead of UDP (improves reliability, slight overhead. (Default: true)
  -s, --tls                            Use TLS for securing traffic
  -k, --tls-key=<s>                    TLS Key to use when using TLS
  -r, --tls-cert=<s>                   TLS Certificate to use when using TLS
  --tls-ca-cert=<s>                    Trusted CA Certificate when using TLS
  -v, --tls-verify, --no-tls-verify    Verify TLS peer when using TLS (default: true)
  -u, --cpu-warning=<f>                CPU warning threshold (fraction of total jiffies) (default: 0.9)
  --cpu-critical=<f>                   CPU critical threshold (fraction of total jiffies) (default: 0.95)
  -d, --disk-warning=<f>               Disk warning threshold (fraction of space used) (default: 0.9)
  --disk-critical=<f>                  Disk critical threshold (fraction of space used) (default: 0.95)
  -g, --disk-ignorefs=<s+>             A list of filesystem types to ignore (default: anon_inodefs, autofs, cd9660, devfs, devtmpfs, fdescfs, iso9660, linprocfs, linsysfs, nfs, overlay, procfs, tmpfs)
  -o, --load-warning=<f>               Load warning threshold (load average / core) (default: 3.0)
  --load-critical=<f>                  Load critical threshold (load average / core) (default: 8.0)
  -y, --memory-warning=<f>             Memory warning threshold (fraction of RAM) (default: 0.85)
  --memory-critical=<f>                Memory critical threshold (fraction of RAM) (default: 0.95)
  -w, --uptime-warning=<i>             Uptime warning threshold (default: 86400)
  --uptime-critical=<i>                Uptime critical threshold (default: 3600)
  -n, --users-warning=<i>              Users warning threshold (default: 1)
  --users-critical=<i>                 Users critical threshold (default: 1)
  --swap-warning=<f>                   Swap warning threshold (default: 0.4)
  --swap-critical=<f>                  Swap critical threshold (default: 0.5)
  --checks=<s+>                        A list of checks to run. (Default: cpu, load, memory, disk, swap)
  --help                               Show this message

With the above output, one must run riemann-health --checks cpu,load,memory,disk,uptime,users,swap to run with all checks, because uptime (#218) and users (#226) are not enabled by default.

Should we enable all checks by default and assume users who do not care about some of them to explicitly list the one they are interested in?

Build a new gem file and publish

Hi,

Looks like this repository has undergone some major changes lately where a lot of code have been broken out to new gem-files. Which is a nice move!

The problem is that the new gem files still have a requirement to riemann-tools. So if you install for instance riemann-docker gem it as a dependence to riemann-tools (last version in rubygems is 0.2.7).

Is it possible to get a new version of riemann-tools built so we get a more clean dependency matrix?

Best regards

No support for TLS

The Riemann howto page includes some brief color on securing transport with TLS (http://riemann.io/howto.html#securing-traffic-using-tls). riemann-tools doesn't appear to have any support for this.

The hoped-for behavior is to be able to provide tls-key, tls-cert, and tls-ca-cert as command-line options.

I suspect that this will take some digging in to riemann-ruby-client and passing the data through - does that sound right? I'm totally willing to take a stab at this :)

riemann-varnish error

Hi

I have installed riemann tools and try to run "riemann-varnish". Im getting the following error (Im using CentOS 7)

/usr/local/share/gems/gems/riemann-tools-0.2.10/bin/riemann-varnish:16:in block in initialize': undefined method[]' for nil:NilClass (NoMethodError)
from /usr/share/ruby/open3.rb:217:in popen_run' from /usr/share/ruby/open3.rb:99:inpopen3'
from /usr/local/share/gems/gems/riemann-tools-0.2.10/bin/riemann-varnish:15:in initialize' from /usr/local/share/gems/gems/riemann-tools-0.2.10/lib/riemann/tools.rb:9:innew'
from /usr/local/share/gems/gems/riemann-tools-0.2.10/lib/riemann/tools.rb:9:in run' from /usr/local/share/gems/gems/riemann-tools-0.2.10/bin/riemann-varnish:54:in<top (required)>'
from /usr/local/bin/riemann-varnish:23:in load' from /usr/local/bin/riemann-varnish:23:in

'

Any help on this please...

Best Regards
Sujith P V

Could not set docker-host via CLI

Issue

Could not set --docker-host command line option / docker-host not passed to docker-api correctly.

Docker::Error::ArgumentError Expected a String, got: 'true'
/usr/local/bundle/gems/docker-api-1.34.0/lib/docker/connection.rb:14:in `initialize'
/usr/local/bundle/gems/docker-api-1.34.0/lib/docker.rb:94:in `new'
/usr/local/bundle/gems/docker-api-1.34.0/lib/docker.rb:94:in `connection'
/usr/local/bundle/gems/docker-api-1.34.0/lib/docker/container.rb:352:in `all'
/usr/local/bundle/gems/riemann-docker-0.1.3/bin/riemann-docker:24:in `get_containers'
/usr/local/bundle/gems/riemann-docker-0.1.3/bin/riemann-docker:181:in `tick'
/usr/local/bundle/gems/riemann-tools-0.2.13/lib/riemann/tools.rb:94:in `block in run'
/usr/local/bundle/gems/riemann-tools-0.2.13/lib/riemann/tools.rb:92:in `loop'
/usr/local/bundle/gems/riemann-tools-0.2.13/lib/riemann/tools.rb:92:in `run'
/usr/local/bundle/gems/riemann-tools-0.2.13/lib/riemann/tools.rb:9:in `run'
/usr/local/bundle/gems/riemann-docker-0.1.3/bin/riemann-docker:215:in `<top (required)>'
/usr/local/bundle/bin/riemann-docker:23:in `load'
/usr/local/bundle/bin/riemann-docker:23:in `<main>'

What's your riemann-tools version?

riemann-docker: 0.1.3
riemann-tools: 0.2.13

What platform are you on?

Docker, Alpine Linux 3.7
Ruby 2.5

Solution

This patch worked for me:

diff --git a/tools/riemann-docker/bin/riemann-docker b/tools/riemann-docker/bin/riemann-docker
index fae70de..17cdf95 100755
--- a/tools/riemann-docker/bin/riemann-docker
+++ b/tools/riemann-docker/bin/riemann-docker
@@ -10,7 +10,7 @@ class Riemann::Tools::DockerHealth
   include Riemann::Tools
   include Docker
 
-  opt :docker_host, "Docker Container Host (see https://github.com/swipely/docker-api#host)", :default => nil
+  opt :docker_host, "Docker Container Host (see https://github.com/swipely/docker-api#host)", :type => String, :default => nil
   opt :cpu_warning, "CPU warning threshold (fraction of total jiffies)", :default => 0.9
   opt :cpu_critical, "CPU critical threshold (fraction of total jiffies)", :default => 0.95
   opt :disk_warning, "Disk warning threshold (fraction of space used)", :default => 0.9

Error in riemann-net when new interfaces are added

On one of our hosts being monitored by riemann-net, we just ran into the following error after installing and starting Docker:

TypeError nil can't be coerced into Fixnum
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:71:in `-'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:71:in `block in tick'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `each'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `tick'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:101:in `block in run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `loop'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:11:in `run'
/usr/lib/ruby/gems/2.1.0/gems/riemann-tools-0.1.8/bin/riemann-net:101:in `<top (required)>'
/usr/local/bin/riemann-net:23:in `load'
/usr/local/bin/riemann-net:23:in `<main>'

Looking at line 71 of that script as it was in version 0.1.8, it looks like the issue is that there is no check to see if a service is actually a key in @old_state before trying to calculate delta. When a new interface is added (e.g. the veth* or docker0 interfaces added when Docker is started), then the list of services in state has keys that aren't in @old_state, leading to the error we saw.

This same code is still in the riemann-net script on master. It looks like an easy fix would be to skip reporting for all services where @old_state.has_key? service is false.

Load warning/critical doesn't work

Issue

The load is divided by cores while the default values are set without division and the command line options do not allow decimals.

What's your riemann-tools version?

0.2.11

What platform are you on?

ubuntu 1404

riemann-docker-health

I would like to create a tool that monitors the health (in the same way as riemann-health does) of all the containers running in a given host.

Before I start to do that, I don't have a lot of knowledge in ruby, I belive it's enough to do that - how do I run a tool without compiling it first with rake? and If i need to add "dependency" for a gem, how do I do that?

Thanks.

Riemann-aws fails to use instance profile with error regarding required aws keys

I am trying to use riemann-aws with an instance profile, but it fails with a nasty fog error saying that the aws access and secret keys are required. It looks like the PR that fixes this was merged (#157), but the change isn't available when doing a normal gem install
gem install --no-ri --no-rdoc -v 0.1.2 riemann-aws
gem install --no-ri --no-rdoc -v 0.2.11 riemann-tools

Is there any way to make that available?

Disk usage resolution is coarse

Issue

riemann-health rely on df(1) and use the capacity/use% column to build the disk metric. The column in df(1) being an integer, this leads to coarse information for disk usage when compared to other metrics:

image

We could compute a more precise value using the size/used/avail columns raw values in blocks. This would allow more smooth graph and show smaller variations of disk usage.

What's your riemann-tools version?

1.0.0 (latest)

What platform are you on?

Not OS-dependent.

Load average on AWS does not divide by number of cores

All "processors" on the output of cat /proc/cpuinfo have the same "core id". It seems each of them is a part of a hyperthreaded core.

Currently, riemann-health behaves as if the machine has a single processor, always dividing the load average by 1. I don't know if it's possible to get the actual number of cores assigned to the VM, but there is probably a better estimate than 1.

E.g, here is the output of a 4 vCPU instance, reporting all "processors" as having core id = 2:

processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 45
model name    : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping    : 7
microcode    : 0x70b
cpu MHz        : 2599.998
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 2
cpu cores    : 1
apicid        : 5
initial apicid    : 5
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips    : 5199.99
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 45
model name    : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping    : 7
microcode    : 0x70b
cpu MHz        : 2599.998
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 2
cpu cores    : 1
apicid        : 5
initial apicid    : 5
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips    : 5199.99
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 45
model name    : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping    : 7
microcode    : 0x70b
cpu MHz        : 2599.998
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 2
cpu cores    : 1
apicid        : 5
initial apicid    : 5
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips    : 5199.99
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 45
model name    : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
stepping    : 7
microcode    : 0x70b
cpu MHz        : 2599.998
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 2
cpu cores    : 1
apicid        : 5
initial apicid    : 5
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips    : 5199.99
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

Trollop gem replaced by optimist

riemann-health plugin gives a deprecation warning.

[DEPRECATION] This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.

riemann-zookeeper fails silently on zookeeper 3.3.x and below

We noticed that riemann-zookeeper requires the mntr command which only comes with zookeeper 3.4 and above. It would be awesome if it uses stat for zookeeper 3.3.x and below. Additionally we didn't realize it wasn't running because it fails silently if mntr doesn't output. @tehgeekmeister.

riemann-health - full command support

The server I'm using runs a lot of Python processes, so it is not easy for me to tell which Python processes are consuming the most memory. Being able to see the full command for each process would be a really useful feature, as I currently can't tell each Python process apart, and the processes are not daemons, so the PID does not hang around for long.

Am I missing something in the documentation or is this not possible?

riemann-tools version: 0.2.11
Platform: Debian Wheezy

Ripe new release?

The version hasn't been bumped for a while (and no gem has been released). If the project is in a good state, version 0.1.4 would be welcomed

riemann-riak fails to detect if riak is down

I noticed this in my environment; although riak ring goes to warning, everything else stays normal. I know the issue and have a fix, which I shall submit via a pull request shortly.

opening this so others are aware

riemann-elasticsearch: needs exception handling

If tick_indices or tick_search raises an exception, tick never reaches arguably the most important part: checking the cluster health. This can lead to missed alerts when the cluster is unhealthy and causes other checks to fail. To fix, handle exceptions from tick_indices and tick_search, or make those methods more robust.

By the way, here's a real response that tick_search can receive when the cluster is unhealthy, and that causes the method to fail:

{"_shards":{"total":19402,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}

riemann-net stopped working with beefcake version 0.4.0

After doing a "gem update" beefcake was upgraded from 0.3.7 โ†’ 0.4.0 and riemann-net stopped working with this message:

RuntimeError can't modify frozen String
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `force_encoding'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `append_string'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:13:in `append'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:102:in `block in encode!'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:94:in `block in encode!'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/var/lib/gems/1.9.1/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/message.rb:13:in `encode_with_length'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/client/tcp.rb:54:in `block in send_recv'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/client/tcp.rb:68:in `block in with_connection'
<internal:prelude>:10:in `synchronize'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/client/tcp.rb:65:in `with_connection'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/client/tcp.rb:53:in `send_recv'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.2/lib/riemann/client.rb:49:in `<<'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:73:in `block in report'
/usr/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:72:in `report'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/bin/riemann-net:92:in `block in tick'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `each'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/bin/riemann-net:70:in `tick'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:101:in `block in run'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `loop'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:99:in `run'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/lib/riemann/tools.rb:11:in `run'
/var/lib/gems/1.9.1/gems/riemann-tools-0.1.8/bin/riemann-net:101:in `<top (required)>'
/usr/local/bin/riemann-net:23:in `load'
/usr/local/bin/riemann-net:23:in `<main>'

Uninstalling beefcake 0.4.0 (and leaving only 0.3.7) fixed the problem.

riemann-varnish not working with Varnish 4+

Varnish 4.x + has changed the varnishstat command and field names. The new fields should be:

  @vstats = [ "MAIN.sess_conn",
                "MAIN.sess_drop ",
                "MAIN.client_req",
                "MAIN.cache_hit",
                "MAIN.cache_miss" ]

I guess we should capture the version output from varnishstat -V and switch on that?

riemann-redis run_id can be infinity

Riemann-redis will convert the redis run_id to a float, this can come out as Infinity in ruby.

The run_id is a "Random value identifying the Redis server (to be used by Sentinel and Cluster)".

Rather than change the value to a float, I'd like to set it to nil or 0 as I think that more accurately reflects the run_id (the actual value will still be saved in the description).

Anyone using this value as a metric? Happy for this change?

Official docker image(s)

Along the lines of riemann/riemann#922 an official docker image would be swell ๐Ÿ‘

I've spent about an hour trying to get any of the existing public docker image to run, but a lot of them are old and not configurable (such as #184).

Split repository

The dependencies for riemann-tools are spiraling out of control, now requiring mysql libraries and libxslt1 to be installed on target systems. This is just going to keep getting worse as more and more stuff is added to the main riemann-tools repository.

I have discussed the idea of splitting this repository into multiple, per-tool repos with @aphyr before and would be willing to put effort into this again if there's an interest in going in this direction.

riemann-health EMSGSIZE Message too long - sendto(2) on OSX

I think output of top is too big to fit within UDP packet size; in https://github.com/aphyr/riemann-tools/blob/master/bin/riemann-health#L171 ?

/zfs/shared/repos/riemann/scripts/vendor/bundle/ruby/1.9.1/gems/riemann-tools-0.0.8/bin/riemann-health:248:in `<top (required)>'
/zfs/shared/repos/riemann/scripts/vendor/bundle/ruby/1.9.1/bin/riemann-health:23:in `load'
/zfs/shared/repos/riemann/scripts/vendor/bundle/ruby/1.9.1/bin/riemann-health:23:in `<main>'
Errno::EMSGSIZE Message too long - sendto(2)

riemann-health exception

Issue

What's your riemann-tools version?

riemann-tools-0.2.11

Riemann::Client::TcpSocket::Error Could not connect to 127.0.0.1:5555: Errno::EINVAL: Invalid argument
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:128:in `setsockopt'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:128:in `blank_socket'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:213:in `connect_nonblock'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:199:in `connect_or_error'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:177:in `block in connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `each'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `find'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:79:in `connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp.rb:17:in `block in socket_factory'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp.rb:33:in `call'

Operating system, version.
ubuntu14 (win10) ruby 1.9

problem sending tags

I'm using riemann-health to send tagged events. Here is the command that I'm using:

riemann-health  --tag "atrib"

The corresponding riemann log output:

WARN [2016-01-18 08:44:43,746] worker-3 - riemann.transport.websockets - ws-handler caught; closing websocket connection.
clj_antlr.ParseError: token recognition error at: '''
extraneous input '=' expecting STRING
extraneous input '=' expecting STRING
token recognition error at: '''
        at clj_antlr.common$parse_error.invoke(common.clj:146)
        at clj_antlr.interpreted.SinglethreadedParser.parse(interpreted.clj:100)
        at clj_antlr.interpreted.ThreadLocalParser.parse(interpreted.clj:122)
        at clj_antlr.core.ParserWrapper.parse(core.clj:13)
        at clj_antlr.core$parse_STAR_.invoke(core.clj:28)
        at clj_antlr.core$parse.invoke(core.clj:35)
        at clj_antlr.core.ParserWrapper.invoke(core.clj:17)
        at riemann.query$ast.invoke(query.clj:118)
        at riemann.transport.websockets$ws_index_handler.invoke(websockets.clj:72)
        at riemann.transport.websockets$ws_handler$handle__6317$fn__6318.invoke(websockets.clj:155)
        at riemann.transport.websockets$ws_handler$handle__6317.invoke(websockets.clj:137)
        at org.httpkit.server.HttpHandler.run(RingHandler.java:91)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

It seems like a parsing error. I ran the test on a box with the following software:
riemann-tools - 0.2.7
OS - ubuntu 15.04 - 64 bits
riemann - 0.2.10
JVM - 1.8.0_66 (Oracle)

Let me know if you need further information about the issue.

Alfredo

Gem::ConflictError

Issue

/usr/lib/ruby/2.3.0/rubygems/specification.rb:2289:in `raise_if_conflicts': Unable to activate riemann-tools-0.2.14, because json-2.1.0 conflicts with json (~> 1.8) (Gem::ConflictError)

riemann-tools (0.2.14)
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
json 2.1.0 and json 1.8

"Ubuntu" VERSION="16.04.5 LTS (Xenial Xerus)"

this is my code

#!/usr/bin/env ruby
require 'daemons'
require 'json'

base_dir = File.dirname(FILE)
File.open("x.log", "a") { |f|
f.puts(Time.now)
}

system("cp conf.json /")

file = File.read('conf.json')
data_hash = JSON.parse(file)
puts data_hash['mysql']['ip']

Daemons.run(
'riemann-atos-health.rb',
#monitor: true,
dir_mode: :normal,
dir: File.expand_path('', base_dir),
log_dir: File.expand_path('', base_dir),
log_output:true,
logfilename: 'x.log',
backtrace: 'async_runner.error.log',
output_logfilename: 'x.log',

mode: :load,
multiple: true
)

riemann-net: Non-zero drop/error always mapped to warning state

Issue

What's the issue...?
Dropped packets after being incremented will continue to be reported as warning even when there are no new packets dropped. Same for error count.

I think delta should be used instead of metric in logic determining state, report warning only when delta is > 0
https://github.com/riemann/riemann-tools/blob/master/bin/riemann-net#L82

What's your riemann-tools version?

0.2.6 but same logic is on trunk

What platform are you on?

Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-66-generic x86_64)

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Service scripts

Some SysV service scripts would help in using these scripts. Even better, native (RPM/deb) packages for some common distributions would be oh so nice.

riemann-consul: incorrect treatment of return value for leader query

Issue

When riemann-consul requests to get the leader hostname, it ignores the fact that the return value is a json value and incorrectly strips out quoting characters.

What's your riemann-tools version?

00aeb62

What platform are you on?

Mac OS Sierra, rbenv, ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]

riemann-nginx?

I'm really loving riemann-health and riemann-redis, but I want to finish out my monitoring with some nice nginx monitoring. Is this something that would be acceptable for this project, or would it be better for me to write my own tool and release it?

Test cases

Hi all,
Where can i find test cases for riemann tools

riemann-net: Initial packet drop not reported as warning

Issue

What's the issue...?
If there are packets dropped on boot, riemann-net will measure dropped packets count as initial value, but since there's no old/previous value, warning will not be reported.

I believe https://github.com/riemann/riemann-tools/blob/master/bin/riemann-net#L77
should be replaced with something like

    if not @old_state.has_key?(service)
      @old_state[service] = 0
    end

What's your riemann-tools version?

0.2.6 but same logic is on trunk

What platform are you on?

Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-66-generic x86_64)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.