Changeset 709df7f0b76d59662c7491bfdb0144208e43f3f7
- Timestamp:
- 03/24/10 18:44:53
(3 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1269456293 +0000
- git-parent:
[090525941ea7bfb70fc26a24a805410ec0c91340]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1269456293 +0000
- Message:
omit state and duration if they are not present
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re20fdcd |
r709df7f |
|
| 148 | 148 | obj = (doc:xpath("last_runtime_seconds", result))() |
|---|
| 149 | 149 | local ds = tonumber(obj and obj:contents()) |
|---|
| 150 | | if ds ~= nil then ds = math.floor(ds * 1000) end |
|---|
| 151 | | check.metric_uint32(prefix .. "duration", ds) |
|---|
| | 150 | if ds ~= nil then |
|---|
| | 151 | ds = math.floor(ds * 1000) |
|---|
| | 152 | check.metric_uint32(prefix .. "duration", ds) |
|---|
| | 153 | end |
|---|
| 152 | 154 | obj = (doc:xpath("state", result))() |
|---|
| 153 | | check.metric_string(prefix .. "state", obj and obj:contents()) |
|---|
| | 155 | if obj ~= nil then |
|---|
| | 156 | check.metric_string(prefix .. "state", obj and obj:contents()) |
|---|
| | 157 | end |
|---|
| 154 | 158 | local metrics = 0 |
|---|
| 155 | 159 | for metric in doc:xpath("metric", result) do |
|---|