Permalink
Browse files

Stringify JMX :ObjectName entries. Fixes #1.

  • Loading branch information...
1 parent db35295 commit a0988dee8fc9f3463e9b64046c75def5a640cbde @technomancy technomancy committed Mar 28, 2012
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

0 comments on commit a0988de

Please sign in to comment.