Ad Widget

Collapse

Error in Problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JulioQc
    Junior Member
    • Dec 2018
    • 28

    #1

    Error in Problems

    Hi,

    I get this error when I navigate to Problems:

    preg_match(): Unknown modifier '0' [jsrpc.php:90 → CScreenProblem->get() → getTriggerDependencies() → CMacrosResolverHelper::resolveTriggerNames() → CMacrosResolver->resolveTriggerNames() → CMacrosResolver->resolveTriggerExpressions() → CMacrosResolverGeneral->getUserMacros() → CMacrosResolverGeneral->getHostUserMacros() → preg_match() in include/classes/macros/CMacrosResolverGeneral.php:1340]

    Is there a way for me to track it down to the faulty item/template/trigger that causes this? Seems like a macro but which one?

    Thank you!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    And your environment is... ? versions etc...

    Comment

    • JulioQc
      Junior Member
      • Dec 2018
      • 28

      #3
      Ya sorry that's Zabbix 5.4.10 on Ubuntu 20.04 and MySQL 8.0.28

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        PHP7? 8? If by accident its 8, then its not supported...

        Comment

        • JulioQc
          Junior Member
          • Dec 2018
          • 28

          #5
          True, I get 7.4.3 for php -v

          Comment

          • JulioQc
            Junior Member
            • Dec 2018
            • 28

            #6
            Any ideas how to track this to the specific template/host/item?
            Issue persist after going to Zabbix 6.2.0

            Comment

            • JulioQc
              Junior Member
              • Dec 2018
              • 28

              #7
              Ok found how to track after noticing the error comes and goes from the dashboard: go to problems, filter to history instead of recent/problems, narrow the time frame until you see the PHP error show up and only a few hosts are listed (I had to narrow to a single minute), filter out host by host until you find which one triggers the alert.

              From there, check your macro values for issues. I my case:

              Code:
              Macro: {$IFCONTROL:regex:"^(Gi[1-4]\/0\/(1[3-9]|[2-3][0-9]|4[0-8]))$"}
              Value: 0
              Find the issue. If regex is true, value is 0 and no error. If regex is false, value is 1 (default from template {$IFCONTROL}) but PHP error is shown.
              The whole thing works to exclude some "unimportant interfaces" so I believe this is only cosmetic.

              I hope this gets resolve but I doubt it will without proper support ticket. I hope it helps someone else chasing this issue
              Last edited by JulioQc; 13-09-2022, 22:21.

              Comment

              Working...