Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

shoulda wha? adding seconds to the x-axis time format

  • Loading branch information...
commit fdbcf679db6dd22cb7998043a7825bd92f41174d 1 parent 222c84e
@steelThread authored
Showing with 10 additions and 11 deletions.
  1. +7 −8 README.md
  2. +3 −2 lib/redmon/public/redmon.js
  3. +0 −1  redmon.gemspec
View
15 README.md
@@ -1,7 +1,5 @@
# Redmon
-** Work in progress in the very early stages of dev **
-
Simple sinatra based dashbord for redis. After seeing the [fnordmetric](https://github.com/paulasmuth/fnordmetric)
project I was inspired to write this. Some of the ideas there have be carried over here.
@@ -38,9 +36,8 @@ gem install redmon
## Usage
```bash
-$ bundle install
-$ bundle exec bin/redmon -h
-Usage: bin/redmon (options)
+$ redmon -h
+Usage: /Users/sean/codez/steelThread/redmon/vendor/ruby/1.9.1/bin/redmon (options)
-a, --address ADDRESS The thin bind address for the app (default: 0.0.0.0)
-n, --namespace NAMESPACE The root Redis namespace (default: redmon)
-i, --interval SECS Poll interval in secs for the worker (default: 10)
@@ -50,7 +47,7 @@ Usage: bin/redmon (options)
--no-app Do not run the web app to present stats
--no-worker Do not run a worker to collect the stats
-$ bundle exec bin/redmon
+$ redmon
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
@@ -87,12 +84,14 @@ You can configure the Redmon using an initializer config/initializers/redmon.rb:
Redmon.configure do |config|
config.redis_url = 'redis://127.0.0.1:6379'
config.namespace = 'redmon'
- config.poll_interval = 10
end
```
This will mount the Redmon application to the /redmon/ path. The trailing slash
-is important.
+is important. The worker that gathers the redis info stats will not be started
+when Redmon is mounted. In order to get a worker running inside of your Rails
+app you can try this [Railtie](https://github.com/steelThread/redmon/pull/19#issuecomment-7273659)
+based approach.
## License
View
5 lib/redmon/public/redmon.js
@@ -62,7 +62,7 @@ var Redmon = (function() {
function formatTime(time) {
var d = new Date(parseInt(parseInt(time)));
- return d.getHours()+':'+d.getMinutes();
+ return d.getHours()+':'+d.getMinutes()+':'+d.getSeconds();
}
/**
@@ -281,7 +281,8 @@ var Redmon = (function() {
// encapsulate the info widget
var infoWidget = (function() {
function render(data) {
- updateTable(data[data.length-1]);
+ if (data && data.length)
+ updateTable(data[data.length-1]);
}
function onData(ev, data) {
View
1  redmon.gemspec
@@ -34,5 +34,4 @@ Gem::Specification.new do |s|
s.add_development_dependency "rack-test"
s.add_development_dependency "rake"
s.add_development_dependency "rspec", "~> 2.8.0"
- s.add_development_dependency "shoulda", ">= 0"
end
Please sign in to comment.
Something went wrong with that request. Please try again.