Ad Widget

Collapse

How to config Item to Filter dynamic value (digit) from Webpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • B.C.K
    Junior Member
    • Mar 2021
    • 21

    #1

    How to config Item to Filter dynamic value (digit) from Webpage

    ​Hello There,

    I'm used Zabbix 5.2.4 since aprroximately one and a half month.
    After yum update now I have 5.2.6.

    My Problem is that I tried several ways to filter a REST Webpage. For testing reason I activated the Apache server status from Zabbix.
    The Webpage ist https://xxx.xxx.xxx.xxx/server-status?auto
    I got the following Web Page which is shortened:

    127.0.0.1
    ServerVersion: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9
    ServerMPM: event
    Server Built: Nov 4 2020 03:20:37
    CurrentTime: Friday, 23-Apr-2021 11:45:17 CEST
    RestartTime: Friday, 16-Apr-2021 14:19:31 CEST
    ParentServerConfigGeneration: 2
    ParentServerMPMGeneration: 1
    ServerUptimeSeconds: 595546
    ServerUptime: 6 days 21 hours 25 minutes 46 seconds
    Load1: 0.07
    Load5: 0.10
    Load15: 0.09
    Total Accesses: 111685
    Total kBytes: 1985181
    Total Duration: 12072383
    CPUUser: 226.48
    CPUSystem: 238.27
    CPUChildrenUser: 44.16
    CPUChildrenSystem: 55.01
    CPULoad: .0946896


    My goal is to filter for example Total Accesses its value, here 111685, and do a trigger if the value is greater than, then it should be a Problem status. If it is successful then "CPULoad" will be next. I think it will be the same item config, right?
    At regex101.com the Regex ^Total Accesses: (\d+)$ was successfull. But its looks like this Click image for larger version  Name:	2021-04-23 13_42_20-regex101_ build, test, and debug regex.png Views:	0 Size:	2.9 KB ID:	423416

    I tried this via HTTP Agent, but it doesn't work. If I click the "Test" button in Item Config and then "Get value and Test" in the popup Window it is shown the whole text. Not only "Total Accesses: 111685".
    Click image for larger version  Name:	2021-04-23 13_55_24-BAMF E2E Montrng 5.2.4_ Configuration of items.png Views:	0 Size:	5.9 KB ID:	423417

    Note that I do not have the Zabbix Agent in other hosts, because I will not be able to install the agent on all Servers.

    Please help me how to configure an Item. If my config details are needed I can provide it.


    with best regards
    Last edited by B.C.K; 23-04-2021, 14:10.
  • B.C.K
    Junior Member
    • Mar 2021
    • 21

    #2
    Hello Cyber,

    I will look at it and will give Feedback.

    Comment

    • B.C.K
      Junior Member
      • Mar 2021
      • 21

      #3
      Hello Cyber,

      thanks a lot for your hint. That brought me to my goal.

      What I experienced is that I can also do the same way with norml http agent without dependent item.

      The Regex was fault. Instead "^Total Accesses: (\d+)" I had to enter "Total Accesses: (\d+)" without "^".

      Seems that via dependent item I get more advantages in the monitoring section and maybe also in the database.

      But for people who are searching for this post: be careful:
      if you disable the master Item,then no actual data will be available for the dependent items.
      If a master item is deleted, so are all its dependent items.

      Please correct me if I am wrong.

      with best regards

      Comment

      • B.C.K
        Junior Member
        • Mar 2021
        • 21

        #4
        Dear FredjD,

        I wrote "Seems that via dependent item... monitoring section..." and not "...Moviebox Pro monitoring section..."
        May I ask you to correct this, please?

        Comment

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

          #5

          This is probably what you need. Even examples are based on same data.

          Comment

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

            #6
            Originally posted by B.C.K
            Dear FredjD,
            I wrote "Seems that via dependent item... monitoring section..." and not "...Moviebox Pro monitoring section..."
            May I ask you to correct this, please?
            Just flag that post as spam... there is many cases in this forum, where users just answer to random posts, change some words to push some search engine metrics and then disappear.. In many cases also links are added.. I have also seen many cases when a random post from long time ago is taken and just posted as their own to start new thread, but with additional links to random websites..
            But what concerns your questions about item availability and deletion... then those assumptions are correct ... disable master and all dependent ones are disabled, delete master and dependents are deleted... that is the last sentence on doc page.. "If a master item is deleted, so are all its dependent items."

            Comment

            Working...