Mercurial > prosody-modules
comparison mod_munin/mod_munin.lua @ 3129:2ffc268ba2fa
mod_munin: Don’t use host when it is nil.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Thu, 21 Jun 2018 22:38:56 +0200 |
| parents | d85ddd3e588a |
| children | c47cd8dbd310 |
comparison
equal
deleted
inserted
replaced
| 3128:a34e7bd87b39 | 3129:2ffc268ba2fa |
|---|---|
| 102 | 102 |
| 103 if not meta:get(key) then | 103 if not meta:get(key) then |
| 104 if host then | 104 if host then |
| 105 meta:set(key, "", "graph_title", s_format("%s %s on %s", sect, typ, host)); | 105 meta:set(key, "", "graph_title", s_format("%s %s on %s", sect, typ, host)); |
| 106 else | 106 else |
| 107 meta:set(key, "", "graph_title", s_format("Global %s %s", sect, typ, host)); | 107 meta:set(key, "", "graph_title", s_format("Global %s %s", sect, typ)); |
| 108 end | 108 end |
| 109 meta:set(key, "", "graph_vlabel", this and this.units or typ); | 109 meta:set(key, "", "graph_vlabel", this and this.units or typ); |
| 110 meta:set(key, "", "graph_category", sect); | 110 meta:set(key, "", "graph_category", sect); |
| 111 | 111 |
| 112 meta:set(key, name, "label", name); | 112 meta:set(key, name, "label", name); |
