Ad Widget

Collapse

Got messy code for monitor items intermittently when using LLD in Zabbix 3.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soyeon
    Junior Member
    • Jun 2018
    • 6

    #1

    Got messy code for monitor items intermittently when using LLD in Zabbix 3.0

    I used LLD(low level discovery) to discovery json values via calling python script, and this JSON will return a json which contains Chinese character values. After i created item prototype in LLD rules, the items can be created automatically and shown well in the template. But after a few days later, the discovered items are shown as messy codes in Zabbix web console intermittently. Any guys know how can i fix it?
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Originally posted by soyeon
    I used LLD(low level discovery) to discovery json values via calling python script, and this JSON will return a json which contains Chinese character values. After i created item prototype in LLD rules, the items can be created automatically and shown well in the template. But after a few days later, the discovered items are shown as messy codes in Zabbix web console intermittently. Any guys know how can i fix it?
    Hello

    Try to clear web browser cookies and web browser cache. Also could you tell us about your installation: Zabbix version and DBMS, DB encoding, web server?

    Comment

    • soyeon
      Junior Member
      • Jun 2018
      • 6

      #3
      Thanks for your reply.

      It is working well in zabbix version 3.2.5.

      And now I am trying the way you provided in zabbix version 3.0.1. Since the issue is intermittent, so i will get you back if i got the result.

      env information as below:
      zabbix: 3.0.1
      mysql: 5.6
      web server: nginx 1.12
      zabbix db encoding: utf8
      mysql db character setting:
      character_set_client utf8
      character_set_connection utf8
      character_set_database utf8mb4
      character_set_filesystem binary
      character_set_results utf8
      character_set_server utf8mb4
      character_set_system utf8
      character_sets_dir /usr/local/mysql/share/charsets/

      Comment

      • soyeon
        Junior Member
        • Jun 2018
        • 6

        #4
        After clearing web browser cache, the issue is not reproduced till now.

        Before when the issue happened, i checked mysql zabbix DB, the discovered items were shown messy code in "item" table. So after clearing web browser cache, the issue got resolved. So why does this happened? what's the root cause?
        Last edited by soyeon; 28-06-2018, 03:21.

        Comment

        • kernbug
          Senior Member
          • Feb 2013
          • 330

          #5
          Originally posted by soyeon
          After clearing web browser cache, the issue is not reproduced till now.

          Before when the issue happened, i checked mysql zabbix DB, the discovered items were shown messy code in "item" table. So after clearing web browser cache, the issue got resolved. So why does this happened? what's the root cause?
          Hi,

          Not sure, but your browser caches different versions of the site (3.2 / 3.0), which can be the cause of errors in the subsequent display of data. Try using secure tabs for each version during the day to test my hypothesis. I'll try to understand this question on the test bench, if I can, I'll let you know.

          Comment

          • soyeon
            Junior Member
            • Jun 2018
            • 6

            #6
            Actually in my option, it doesn't look like a web browser cache issue. I did a test, once the python codes are called by zabbix auto LLD, the discovered items data will be written to a log file, and then i can see the messy code shown intermittently in the log files. Thus i think the issue is not related to web browser cache. Also it is true that the issue doesn't happen again after clearing chrome bower cache.

            Comment

            • soyeon
              Junior Member
              • Jun 2018
              • 6

              #7
              The issue happened again in Zabbix 3.0. I tried to clear cache and it seems it doesn't work this time.




              Correct one is:
              Click image for larger version  Name:	无标题.png Views:	1 Size:	10.8 KB ID:	361483

              Attached Files
              Last edited by soyeon; 29-06-2018, 06:00. Reason: screeshot.png shows the messy code

              Comment

              • kernbug
                Senior Member
                • Feb 2013
                • 330

                #8
                Originally posted by soyeon
                The issue happened again in Zabbix 3.0. I tried to clear cache and it seems it doesn't work this time.
                Hi,

                Yes, it's not browser problem: https://www.zabbix.com/documentation...ed_to_database
                Non-ASCII characters are incorrectly saved in MySQL


                Affects Zabbix versions 3.0.0, 3.0.1 and 3.0.2 using MySQL database. Issue occurs when Zabbix server or proxy reads, processes and saves back to the database text containing non-ASCII characters (automatic template linking, low-level discovery, notification messages, …) The issue is transient, it is related to MySQL automatic reconnection behaviour. Fixed in 3.0.3rc1, ZBX-10540 contains patch and more information on the issue.
                Please, upgrade. And let me know if it was helpful Don't forget about making a backup before upgrade procedure!

                https://www.zabbix.com/documentation...grade_packages

                Comment

                Working...