diff options
| author | Christian Breunig <christian@breunig.cc> | 2023-07-30 21:55:09 +0200 | 
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2023-07-30 21:55:09 +0200 | 
| commit | 78bb41eacb79ab3a359adcf3bd37af81ddc9aaa1 (patch) | |
| tree | a23f1b5aee49c3e16dbb105c6bdbf7d815e69538 | |
| parent | a92e7761b2f9d61a068f796b4c45d03d3ac60343 (diff) | |
| download | vyos-1x-78bb41eacb79ab3a359adcf3bd37af81ddc9aaa1.tar.gz vyos-1x-78bb41eacb79ab3a359adcf3bd37af81ddc9aaa1.zip | |
T3355: migrate webproxy log to proper "monitor log" tree
| -rw-r--r-- | op-mode-definitions/monitor-log.xml.in | 6 | ||||
| -rw-r--r-- | op-mode-definitions/webproxy.xml.in | 32 | 
2 files changed, 18 insertions, 20 deletions
| diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in index c7be07aa8..ee52a7eb8 100644 --- a/op-mode-definitions/monitor-log.xml.in +++ b/op-mode-definitions/monitor-log.xml.in @@ -339,12 +339,6 @@              </properties>              <command>journalctl --no-hostname --boot --follow --unit keepalived.service</command>            </leafNode> -          <leafNode name="webproxy"> -            <properties> -              <help>Monitor last lines of Webproxy log</help> -            </properties> -            <command>journalctl --no-hostname --boot --follow --unit squid.service</command> -          </leafNode>          </children>        </node>      </children> diff --git a/op-mode-definitions/webproxy.xml.in b/op-mode-definitions/webproxy.xml.in index 70e3ed608..4e555c3d9 100644 --- a/op-mode-definitions/webproxy.xml.in +++ b/op-mode-definitions/webproxy.xml.in @@ -2,23 +2,27 @@  <interfaceDefinition>    <node name="monitor">      <children> -      <node name="webproxy"> -        <properties> -          <help>Monitor WebProxy service</help> -        </properties> -        <command>${vyatta_bindir}/vyatta-monitor Webproxy squid</command> +      <node name="log">          <children> -          <node name="access-log"> -            <properties> -              <help>Monitor the last lines of the squid access log</help> -            </properties> -            <command>if [ -f /var/log/squid/access.log ]; then sudo tail --follow=name /var/log/squid/access.log; else echo "WebProxy access-log does not exist"; fi</command> -          </node> -          <node name="cache-log"> +          <node name="webproxy">              <properties> -              <help>Monitor the last lines of the squid cache log</help> +              <help>Monitor last lines of Webproxy log</help>              </properties> -            <command>if [ -f /var/log/squid/cache.log ]; then sudo tail --follow=name /var/log/squid/cache.log; else echo "WebProxy cache-log does not exist"; fi</command> +            <command>journalctl --no-hostname --boot --follow --unit squid.service</command> +            <children> +              <leafNode name="access-log"> +                <properties> +                  <help>Monitor the last lines of the Webproxy access log</help> +                </properties> +                <command>if [ -f /var/log/squid/access.log ]; then sudo tail --follow=name /var/log/squid/access.log; else echo "WebProxy access-log does not exist"; fi</command> +              </leafNode> +              <leafNode name="cache-log"> +                <properties> +                  <help>Monitor the last lines of the Webproxy cache log</help> +                </properties> +                <command>if [ -f /var/log/squid/cache.log ]; then sudo tail --follow=name /var/log/squid/cache.log; else echo "WebProxy cache-log does not exist"; fi</command> +              </leafNode> +            </children>            </node>          </children>        </node> | 
