projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d1d59f
)
Plugin exec: change notification time to integer.
author
Manuel Luis SanmartĂn Rozada
<manuel.luis@gmail.com>
Thu, 19 Jun 2014 14:37:15 +0000
(16:37 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Sat, 26 Jul 2014 09:09:08 +0000
(11:09 +0200)
Acording to collectd-exec.5 NOTIFICATION DATA FORMAT: time is epoch, i. e. as seconds since 1970-01-01 00:00:00 UTC.
src/exec.c
patch
|
blob
|
history
diff --git
a/src/exec.c
b/src/exec.c
index
cfd82a3
..
b9a7365
100644
(file)
--- a/
src/exec.c
+++ b/
src/exec.c
@@
-744,8
+744,8
@@
static void *exec_notification_one (void *arg) /* {{{ */
fprintf (fh,
"Severity: %s\n"
- "Time: %
.3f
\n",
- severity,
CDTIME_T_TO_DOUBLE
(n->time));
+ "Time: %
u
\n",
+ severity,
(unsigned int)CDTIME_T_TO_TIME_T
(n->time));
/* Print the optional fields */
if (strlen (n->host) > 0)