diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2018-07-21 22:12:32 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2018-07-21 22:12:32 +0100 |
commit | 8c1b6a5fd7bd23fe8391eb774e419c30e8cc4b8a (patch) | |
tree | d23c2c5f50bd089b0f1c4e062eff6d9b453ff2fd /src/metrics.c | |
parent | 8dcdb33be9744083bdc7e9586d9de5b125a55a0a (diff) | |
download | dnsmasq-8c1b6a5fd7bd23fe8391eb774e419c30e8cc4b8a.tar.gz |
New metrics and ubus files.
Diffstat (limited to 'src/metrics.c')
-rw-r--r-- | src/metrics.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/metrics.c b/src/metrics.c new file mode 100644 index 0000000..8672807 --- /dev/null +++ b/src/metrics.c @@ -0,0 +1,44 @@ +/* dnsmasq is Copyright (c) 2000-2018 Simon Kelley + + 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 Free Software Foundation; version 2 dated June, 1991, or + (at your option) version 3 dated 29 June, 2007. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "dnsmasq.h" + +const char * metric_names[] = { + "dns_cache_inserted", + "dns_cache_live_freed", + "dns_queries_forwarded", + "dns_auth_answered", + "dns_local_answered", + "bootp", + "pxe", + "dhcp_ack", + "dhcp_decline", + "dhcp_discover", + "dhcp_inform", + "dhcp_nak", + "dhcp_offer", + "dhcp_release", + "dhcp_request", + "noanswer", + "leases_allocated_4", + "leases_pruned_4", + "leases_allocated_6", + "leases_pruned_6", +}; + +const char* get_metric_name(int i) { + return metric_names[i]; +} |