summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-07 12:37:45 +0200
committerChristian Poessinger <christian@poessinger.com>2022-07-07 12:37:45 +0200
commit97eb86c4866d5f7777e525f5eba1c1c3da3b67c8 (patch)
tree96ee124b8cfc06ae53baa819b72ad4b9ce19d068 /op-mode-definitions
parentee603b3a0f9f3add72c1e5ac2277c013d40cf5a4 (diff)
downloadvyos-1x-97eb86c4866d5f7777e525f5eba1c1c3da3b67c8.tar.gz
vyos-1x-97eb86c4866d5f7777e525f5eba1c1c3da3b67c8.zip
dns: op-mode: T2488: retrieve log info from journalctl
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/dns-forwarding.xml.in43
1 files changed, 42 insertions, 1 deletions
diff --git a/op-mode-definitions/dns-forwarding.xml.in b/op-mode-definitions/dns-forwarding.xml.in
index 6574f2319..baf60efbd 100644
--- a/op-mode-definitions/dns-forwarding.xml.in
+++ b/op-mode-definitions/dns-forwarding.xml.in
@@ -1,5 +1,46 @@
<?xml version="1.0"?>
<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="log">
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Monitor last lines of Domain Name Service (DNS)</help>
+ </properties>
+ <children>
+ <node name="forwarding">
+ <properties>
+ <help>Monitor last lines of DNS forwarding</help>
+ </properties>
+ <command>journalctl --no-hostname --follow --boot --unit pdns-recursor.service</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="dns">
+ <properties>
+ <help>Show DNS information</help>
+ </properties>
+ <children>
+ <node name="forwarding">
+ <properties>
+ <help>Show DNS forwarding information</help>
+ </properties>
+ <children>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show DNS forwarding statistics</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_statistics.py</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
<node name="show">
<children>
<node name="log">
@@ -13,7 +54,7 @@
<properties>
<help>Show log for DNS Forwarding</help>
</properties>
- <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "pdns_recursor"</command>
+ <command>journalctl --no-hostname --boot --unit pdns-recursor.service</command>
</node>
</children>
</node>