nsbeat::Beat method data (public)

 <instance of nsbeat::Beat[i]> data

Defined in packages/xowiki/tcl/nsbeat-procs.tcl

Testcases:
No testcase defined.
Source code:
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
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: