Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Stringify JMX :ObjectName entries. Fixes #1. #2

Merged
merged 1 commit into from

2 participants

@technomancy

Could also fix this by making the JSON encoder aware of the ObjectName class I guess.

@zoka zoka merged commit c71e46e into zoka:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2012
  1. @technomancy
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/ringmon/monitor.clj
View
10 src/ringmon/monitor.clj
@@ -121,6 +121,10 @@
:parent-url
:lein-webrepl]))
+;; Can't serialize JMX entries without this
+(defn- object-name-str [x]
+ (update-in x [:ObjectName] str))
+
(defn get-mon-data
[sname client-ip]
(let [os (jmx/mbean "java.lang:type=OperatingSystem")
@@ -138,9 +142,9 @@
:AjaxReqsPerSec (format "%7.2f" @ajax-reqs-ps)}
:LeinProject (repl/get-lein-project)
:JMX
- {:OperatingSystem os
- :Memory mem
- :Threading th}
+ {:OperatingSystem (object-name-str os)
+ :Memory (object-name-str mem)
+ :Threading (object-name-str th)}
:nREPL repl ; nREPL must be before since it carries sid
:ReplSessions sessions
:_chatMsg msg
Something went wrong with that request. Please try again.