Ad Widget

Collapse

regex condition

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cristiandv15
    Junior Member
    • Dec 2020
    • 4

    #1

    regex condition

    Dear friends

    I have a dependent item which has the following output


    HTTP/1.1 301 Moved Permanently
    Date: Wed, 03 Feb 2021 18:18:16 GMT
    Server: Apache/2.4.6 (CentOS) PHP/7.3.19
    Location: http://x.x.x.x/mid/
    Content-Length: 240
    Content-Type: text/html; charset=iso-8859-1

    HTTP/1.1 200 OK
    Date: Wed, 03 Feb 2021 18:18:16 GMT
    Server: Apache/2.4.6 (CentOS) PHP/7.3.19
    Last-Modified: Sat, 23 May 2020 21:15:13 GMT
    ETag: "55e-5a6573ddd8089"
    Accept-Ranges: bytes
    Content-Length: 1374
    Content-Type: text/html; charset=UTF-8


    i have need extract the code 200 (BLUE) with regular expression or other way

    Any ideas??

    thanks
    Last edited by cristiandv15; 03-02-2021, 21:03.
  • gofree
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2017
    • 400

    #2
    hi,

    maybe you could use web scenario ? if yes you could "follow redirect" and check for the response code 200



    if not try to play with https://regex101.com/ to get your regexp working ( possibly try to narrow down the input data )

    Comment

    Working...