DX NetOps

Expand all | Collapse all

SPM TEST - Text Match

Jump to Best Answer
  • 1.  SPM TEST - Text Match

    Posted 01-10-2020 01:12 PM
    Hello, Today i use the "SPM TEST" Module to successfully monitoring web addresses HTTP/HTTPS .

    I need an option to validate page result content when less than an x value ( example: < 15 ).

    Suggestions ?

    Thanks, Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------


  • 2.  RE: SPM TEST - Text Match

    Posted 01-10-2020 02:08 PM
    When you create or edit the test, click on the Threshold tab and enter your threshold values.


    Joe



  • 3.  RE: SPM TEST - Text Match

    Posted 01-20-2020 02:56 PM
    Hi Joseph.

    I'm sorry, the options don't suit me.

    The condition I want to check is match content, when it is LESS than a certain alarm number.

    Cássio

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 4.  RE: SPM TEST - Text Match

    Posted 01-21-2020 05:34 AM
    Under Advanced Tab, there is a field "Text Match" with which you can try to match the text and alarm if the text is not matched. Here, you need to set a regular expression to match any number above the given number. Example, if you would like to alarm on numbers <15, RegEx should match the numbers above 15 and the number matched is below 15, an alarm will be generated as the matched numbers >=15 are not matched.

    Note: Matching only numbers may not give you the good results if the web page contains multiple numbers across the entire page. Make sure to use some common text which is associated with the number you would like to match and alarm. Example: If the page contains "Records processed 15", use the RegEx to match the string "Records processed" aong with the RegEx to match numbers >=15. If the text on the Web page is "Records processed 9", an alarm should generate.

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/it-operations-management/spectrum/10-2/managing-network/service-performance-manager/working-with-performance-tests/configure-tests/configure-advanced-parameters.html



    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 5.  RE: SPM TEST - Text Match

    Posted 01-21-2020 05:49 AM
    Hi Rajashekar,

    thanks for the readiness.

    I didn't know the item accepted regular expression. I'm going to test it.

    Cásssio

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 6.  RE: SPM TEST - Text Match

    Posted 01-21-2020 05:55 AM
    As per the document, it should work with a regular expression or a text string that you want to match on the pages you test.
    Also note that, this field is available for HTTP and HTTPS tests for SystemEDGE hosts only.


    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 7.  RE: SPM TEST - Text Match

    Posted 01-21-2020 07:15 AM
    Rajashekar,

    the version of my spectrum is 10.1.1, and the SPM test is running through a server with the systemedge agent version 5.9.0, part of the CA Virtual Assurance 12.6 package.

    Would you do it?

    The link you sent is from another version, 10.2, and shows other field/parameter options.

    Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 8.  RE: SPM TEST - Text Match

    Posted 01-21-2020 07:37 AM
    Rajashekar,

    in my version is not working, the error Text Match not found.

    my cf file this in this format

    index=682146600
    type=http
    desc="Tests Certificate URL Catalog Prodemge"
    dest="http://catalog.prodemge.gov.br"
    encoded="yes"
    password=""
    args="max_depth=1&search=<=10&minmatch=1&content_dl=no&content_err=no"
    interval=120
    samples=3
    timeout=5
    window=60
    tos=0
    limit=0
    status=active
    name=""
    class=""
    context=""
    flags="0x0"

    Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 9.  RE: SPM TEST - Text Match

    Posted 01-21-2020 08:03 AM
    How are you configuring the test? If you are not using Spectrum, Follow the below steps (it is available in all Spectrum 10.x versions) in Spectrum.
    1. Spectrum OneClick --> Select Locator Tab --> Expand SPM
    2. Launch "All Test Hosts" --> Select the SysEDGE host that you are using for URL monitoring
    3. Right click on the test host and select HTTP
    4. Proceed to provide the details like Name, Destination URL, Latency TimeOut and other fields under General Tab
    5. Select Advanced tab and enter the regular expression for Text Match and you can also set the minimum matches (default: 1)
    6. Select the Schedule Tab and enable the Schedule
    7. If you are interested in other metrics, select thresholds tab and enable the threshold type along with the threshold values
    8. Click ok

    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 10.  RE: SPM TEST - Text Match

    Posted 01-21-2020 08:30 AM
    Please ignore my last update.

    I see an entry in test configuration for text match.
    args="max_depth=1&search=<=10&minmatch=1&content_dl=no&content_err=no"

    Is that web page contains <=10 as a string? if that is not available, test will timeout and you can see an event and an alarm (based on number of cycles or if there is any event customization) like below.



    If the provided string is available, you will get the results event like below.





    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 11.  RE: SPM TEST - Text Match

    Posted 01-21-2020 09:17 AM
    One more thing, I don't think we can perform comparison of a number on a web page. As I mentioned earlier, you need to look for the text associated with that number to achieve the result.

    Below is an example.

    My web page contains dates from January 15, 2020 to January 31, 2020 (only one date at a time). I want to monitor and alarm if there is a date listed on page from January 1, 2020 to January 14, 2020. Below is the RegEx (.*January.1[5-9].*|.*January.2[0-9].*|.*January.3[0-1].*)I used to achieve this.

    The RegEx checks for the strings January 15, 2020 till January 31, 2020. If these are not present, an alarm will be generated.

    Can you please post the screenshot of part of the web page containing the numbers that you want to monitor? Also, mention the criteria.


    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 12.  RE: SPM TEST - Text Match

    Posted 01-21-2020 10:13 AM
    Rajashekar.

    I understood your example perfectly.

    However, what I need is to simply verify that the page result (example: http://moncert.prodemge.gov.br/checki.php?url=www.pcnet.mg.gov.br) is less than 10. And then generate alarm.

    In case the contented call result of the page, it will be a single numerical value.

    Cássio


    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------



  • 13.  RE: SPM TEST - Text Match
    Best Answer

    Posted 01-21-2020 11:02 AM
    From the screenshot you attached, I can see the page contains only the count as string and no other text is available.

    You can use the below RegEx to monitor the values less than or equal to 10.
    1[1-9]{1,3}|[2-9][0-9]{1,3}  --> This always looks for the number above 11.

    You can use the below RegEx to monitor the values less than 10.
    [1-9][0-9]{1,3}  --> This always looks for the number above 10.

    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 14.  RE: SPM TEST - Text Match

    Posted 01-21-2020 11:03 AM
    In the first RegEx case, if there is a number less than or equal to 10 is displayed, an alarm will be generated as it is not matching other numbers above 11.
    In the Second RegEx case, if there is a number less than 10 is displayed, an alarm will be generated as it is not matching other numbers above 10.

    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 15.  RE: SPM TEST - Text Match

    Posted 01-22-2020 02:27 AM
    ​Hi Cássio!

    In your example I would look at the html code of the page and use something like this as regex:
    <body>.*[0-9]{2}.*</body>

    means the page should contain at least two digits (and any number of other characters) . That would alarm if the count falls below 10.
    You might need to refine this to adopt to formating or errors.

    Cheers,
    Joern



    ------------------------------
    Senior System Engineer
    Computacenter
    ------------------------------



  • 16.  RE: SPM TEST - Text Match

    Posted 01-22-2020 11:12 AM
    Hello

    thank you all for the guidelines. The test was successfully implemented after these actions.

    Thanks.

    Cássio Pinheiro

    ------------------------------
    Analista
    Cia de Tecnologia da Informação de Minas Gerais - PRODEMGE
    ------------------------------