- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsbeat::Beat
::nsbeat::Beat create ... \
[ -outputLocation (default "http://localhost:9200/") ]
Defined in packages/xowiki/tcl/nsbeat-procs.tcl
Class Relations
::nx::Class create ::nsbeat::Beat \ -superclass ::nx::ObjectMethods (to be applied on instances)
beat (scripted, public)
<instance of nsbeat::Beat> beat
- Testcases:
- No testcase defined.
set data [:data] ns_log notice "nsbeat DATA:\n$data" :nspost $datadata (scripted, public)
<instance of nsbeat::Beat> data
- Testcases:
- No testcase defined.
set index nsbeat-[clock format [clock seconds] -format "%Y.%m.%d"] set data "" foreach serverName [ns_info servers] { foreach poolName [lsort [ns_server -server $serverName pools]] { # # provide a nicer name for the pool # set startClicks [clock clicks -microseconds] set poolLabel "default" if {$poolName ne {}} {set poolLabel $poolName} set rtt [expr {[clock clicks -microseconds] - $startClicks}] set stats [ns_server -server $serverName -pool $poolName stats] set header [subst {{"index":{"_index":"$index","_type":"doc"}}}] regsub -all \n [subst $::nsbeat::template(serverStats)] "" payload regsub -all {\s\s+} $payload " " payload append data $header\n$payload\n } } foreach {dbPool stats} [ns_db stats] { set header [subst {{"index":{"_index":"$index","_type":"doc"}}}] regsub -all \n [subst $::nsbeat::template(dbStats)] "" payload regsub -all {\s\s+} $payload " " payload append data $header\n$payload\n } return $data
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables