X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcommon.h;h=56b3d0e3c964cff4cc21878ac584ed1728658e1a;hp=f759bc5ec0019d42d4b0461589c70e24db50b99f;hb=107a919d0d15d51d774c92ac72879d869e0fa4ee;hpb=8cf1acdb96d027b1d48c9dfb74fea313e63ceedf diff --git a/src/common.h b/src/common.h index f759bc5e..56b3d0e3 100644 --- a/src/common.h +++ b/src/common.h @@ -1,6 +1,6 @@ /** * collectd - src/common.h - * Copyright (C) 2005-2007 Florian octo Forster + * Copyright (C) 2005-2008 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -181,4 +181,12 @@ int getpwnam_r (const char *name, struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp); #endif +int notification_init (notification_t *n, int severity, const char *message, + const char *host, + const char *plugin, const char *plugin_instance, + const char *type, const char *type_instance); +#define NOTIFICATION_INIT_VL(n, vl, ds) \ + notification_init (n, NOTIF_FAILURE, NULL, \ + (vl)->host, (vl)->plugin, (vl)->plugin_instance, \ + (ds)->type, (vl)->type_instance) #endif /* COMMON_H */