Details

    • Bug
    • Resolution: Fixed
    • Trivial
    • None
    • Professional Edition
    • Web Interface

    Description

      Each line of a syslog entry is double-escaped for single and double quotes, so I get a "\" before and quote. See attached.

      Attachments

        Activity

          [OBS-3412] Wrong string escaping for syslog
          bot Observium Bot made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          Done. Thank you for the suggestion.

          Regards, Luca

          rebeluca Luca Rebellato added a comment - Done. Thank you for the suggestion. Regards, Luca

          yes, just remove template-escape(yes)

          landy Mike Stupalov added a comment - yes, just remove template-escape(yes)

          Do you suggest to disable escaping in syslog-ng template?

          rebeluca Luca Rebellato added a comment - Do you suggest to disable escaping in syslog-ng template?

          Ahh, this is syslog-ng.. and sure - this is template escaping by template-escape(yes), not sure why we use this.

          landy Mike Stupalov added a comment - Ahh, this is syslog-ng.. and sure - this is template escaping by template-escape(yes) , not sure why we use this.

          Hi Mike,

          Observium version is

          Observium 20.7.10596
          #####  Software versions  #####
           o OS                   Linux 5.0.0-1033-gcp [amd64] (Ubuntu 18.04)
           o Apache               2.4.29
           o PHP                  7.2.24-0ubuntu0.18.04.6 (OPcache: DISABLED)
           o Python               2.7.17
           o MySQL                5.7.14-google-log (extension: mysqli 5.0.12-dev)
           o SNMP                 NET-SNMP 5.7.3
           o RRDtool              1.7.0
           o Fping                4.0 (IPv4 and IPv6)
          #####  Memory Limit  #####
           o PHP                  Unlimited
          #####  MySQL mode  #####
           o MySQL                NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
          #####  Charset info  #####
           o PHP                  UTF-8
           o MySQL                utf8
          #####  Timezones info  #####
           o Date                 Wednesday, 15-Jul-20 10:36:25 UTC
           o PHP                  +00:00
           o MySQL                +00:00

           

          and this is syslog-ng configuration:

          source s_net {
            udp();
          };
          destination d_observium {
            program("/opt/observium/syslog.php" template ("$HOST||$FACILITY||$LEVEL_NUM||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));
          };
          log {
            source(s_net);
            destination(d_observium);
          };

           

          Thank you for the fix!

          Luca

          rebeluca Luca Rebellato added a comment - Hi Mike, Observium version is Observium 20.7 . 10596 ##### Software versions ##### o OS Linux 5.0 . 0 - 1033 -gcp [amd64] (Ubuntu 18.04 ) o Apache 2.4 . 29 o PHP 7.2 . 24 -0ubuntu0. 18.04 . 6 (OPcache: DISABLED) o Python 2.7 . 17 o MySQL 5.7 . 14 -google-log (extension: mysqli 5.0 . 12 -dev) o SNMP NET-SNMP 5.7 . 3 o RRDtool 1.7 . 0 o Fping 4.0 (IPv4 and IPv6) ##### Memory Limit ##### o PHP Unlimited ##### MySQL mode ##### o MySQL NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION ##### Charset info ##### o PHP UTF- 8 o MySQL utf8 ##### Timezones info ##### o Date Wednesday, 15 -Jul- 20 10 : 36 : 25 UTC o PHP + 00 : 00 o MySQL + 00 : 00   and this is syslog-ng configuration: source s_net { udp(); }; destination d_observium { program( "/opt/observium/syslog.php" template ( "$HOST||$FACILITY||$LEVEL_NUM||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MSG||$PROGRAM\n" ) template-escape(yes)); }; log { source(s_net); destination(d_observium); };   Thank you for the fix! Luca
          landy Mike Stupalov made changes -
          Assignee Original: Adam Armstrong [ adama ] New: Mike Stupalov [ landy ]
          Resolution New: Fixed [ 1 ]
          Status Original: Pending Response [ 10000 ] New: Resolved [ 5 ]

          Anyway cleaned in r10596.

          landy Mike Stupalov added a comment - Anyway cleaned in r10596.

          additioanly, please show your software versions by:

          ./discovery.php -VV

          landy Mike Stupalov added a comment - additioanly, please show your software versions by: ./discovery.php -VV
          landy Mike Stupalov made changes -
          Status Original: Open [ 1 ] New: Pending Response [ 10000 ]

          People

            landy Mike Stupalov
            rebeluca Luca Rebellato
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: