Ad Widget

Collapse

How to Remove empty record in Lastest data / History ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darklord1990
    Junior Member
    • Jul 2018
    • 7

    #1

    How to Remove empty record in Lastest data / History ?

    Hello guys. Could you please help me on this case ?

    I added an userparameter to call my local script with key "node.log". This script will check log file and show its content. If there is no new file, Script will not show anything.
    Then, I created item with that key to show content the log file with Update interval = 30s.

    As my script will show the new file only, so if there is no new log file, there is empty record in Lastest data / History.

    Click image for larger version  Name:	history.PNG Views:	1 Size:	66.0 KB ID:	363712

    My question is : Can I remove these empty records ? Or Can we skip check if there is no new log file ?

    I am using Zabbix 3.4 with Centos 7.4
  • myRCzabbix
    Member
    • Jun 2018
    • 39

    #2
    As far as I understand it, those entries are generated by the checks you asked Zabbix to do, therefore, the only way to remove them is to stop the checking.

    Comment

    • darklord1990
      Junior Member
      • Jul 2018
      • 7

      #3
      Thanks myRCzabbix for your reply.

      In my opinion, The item will check if there is new log file, and otherwise, it will skip the check
      Are there any way to do that ?

      Comment

      • myRCzabbix
        Member
        • Jun 2018
        • 39

        #4
        That doesn't make any sense ... how can Zabbix skip a check when there is no new log file if the only way to determine if there is a new log file is to check for it? That's a catch-22.

        Perhaps you want to do something different than what you are describing.

        Comment

        • darklord1990
          Junior Member
          • Jul 2018
          • 7

          #5
          I want to show log data of new file only. My script already did that. But I dont know how to show up in Zabbix.

          Could you please give me some advice ?

          Comment

          • myRCzabbix
            Member
            • Jun 2018
            • 39

            #6
            You really could just ignore it (the blank entries, I mean, in Latest Data). They don't affect you in any way.

            Comment

            • myRCzabbix
              Member
              • Jun 2018
              • 39

              #7
              The only other way to do it (and someone else might correct me if I'm wrong), is that if you really want to keep your Latest Data list clean, you could set up the check as a discovery rule. But I think given that it's more complicated and doesn't give you anything in return except a cosmetic improvement, I'd advise against it.

              Comment

              • darklord1990
                Junior Member
                • Jul 2018
                • 7

                #8
                Originally posted by myRCzabbix
                The only other way to do it (and someone else might correct me if I'm wrong), is that if you really want to keep your Latest Data list clean, you could set up the check as a discovery rule. But I think given that it's more complicated and doesn't give you anything in return except a cosmetic improvement, I'd advise against it.
                OK Thanks . Let me try with discovery rule.

                Comment

                Working...