Azure Application Insights Monitor Availability Test Content Match unable to match multiple lines - azure

At our company, we're hoping to do some monitoring on the availability of a product we use. We only have local client installations, and the service is provided by a third party. This third party has a "status" URL which can be checked for the current status of various services provided.
I'm attempting a Standard Test through Application Insights, Availability. This can do a Content Match and pass or fail whether found or not. Through testing, looking at the Response Body of successes and failures, it is matching against the HTML returned by the page.
When attempting a content match for any single line from the response body, I'm able to get a successful content match.
For example, the very top of the response body has these two common lines:
<html lang="en">
<head>
If I try a content match for only <html lang="en"> it finds it. If I try for <head>, it successfully finds that as well.
Attempting a content match for the 2 lines together, fails. I've tried numerous things, running them together in case it's ignoring the newline/carriage return, including quotes, etc. Nothing appears to work. I'm hoping someone has run into a similar issue and can offer some assistance.
Thank you!

Created Application Insight as "sample"
Followed the path below: Investigate>Availability>Add standard test.
Here, I went with the case as you mentioned.
<html lang="en">
<head>
But its failed. We need to escape the sequence from one character to another with \n.
Then, I achieved successful.

Related

Using meta tags in a Twig template

I am in the process of experimenting with Pico CMS which uses a flat files organized in hierarchical folders and Twig as its layout engine. I have studied the Twig documentation and looked at a few example templates. One of the things I have consistently found is the way they incorporate meta data. Here is one example
---
Description:Page Description Placeholder
---
in the markdown file, say index.md, and then
<meta name="description" content="{{ meta.description|striptags }}" />
in the corresponding Twig template, index.twig
I understand what is happening here. However, my attempts to find a description for this way to handle meta data have failed. I may well be looking for the wrong thing or have somehow managed to miss this in the Twig docs. I'd be most grateful to anyone who might be able to put me on the right track

Web Scraping, data keywords

i want to crawl a web site, by finding some specific data on it. Does web scraper support keyword properties, for example: i want to extract all data containing the words Java, PHP developper. Is there some web crawlers which can support these properties ?
Basically there is no special keyword scrapers. Yet you might imitate them.
Case 1
You suppose the html head section meta contains keywords:
<html>
<head>
<meta name="keywords" content="java, php, python, linux">
<head>
<html>
1. Scrape not the whole web page but rather a part of it - 1st 1000 characters.
Check this part for keywords. Use regex for it, for ex. /java|php|linux|python/gi
If found, mark/save this url and use it for thourought scrape in future.
Case 2
No meta with keywords in interest on web pages. :-(
Just make a regular page content retrieving, using regex (see above) for keywords presence check in the whole page text.

ModX: Display multiple pages on one page -How to implement

I understand I am meant to use Ditto to do this but am unsure where to go from there.
Currently, I have a Template with all my TVs on it along with several pages using the template that are stored under a parent. The Ditto code I am using is:
[!Ditto? &parents=`173`&orderBy=`createdon ASC` &tpl=`showtemp` &display=`100` &total=`100`!]
However, when I view the page I get the error:
&tpl either does not contain any placeholders or is an invalid chunk name, code block, or filename. Please check it.
My chucnk ('showtemp') looks like:
<div class="showmedia">
[*showmedia*]
</div>
<div class="showright">
<h2>[*showname*]</h2>
<h2>[*showtime*]</h2>
</div>
As far as the set up goes I am not sure if I am going about it right.
Do I make a Chunk as if it were a normal template with TVs, then replicate it as a proper template, create the resources and go from there?
If someone could give me a step by step on how to do this correctly I would be very grateful! Thanks
You're getting that error message because your placeholder syntax is incorrect in this context.
[*templateVariable*] is correct for displaying the current resource's TVs, but in a chunk to be used within a snippet loop such as in Ditto you need to format them as placeholders like this: [+templateVariable+]
I would recommend going through each step in the following tutorial, it will help you understand all the MODX fundamentals:
http://codingpad.maryspad.com/2009/03/28/building-a-website-with-modx-for-newbies-part-1-introduction/

Working example of og:audio:artist and og:audio:album

Can someone identify ONE WEB PAGE where <meta property="og:audio:artist"> and <meta property="og:audio:album"> are actually working to set the Artist and Album when sharing the URL of the page?
I have been banging away at http://www.coises.com/songs/sfcarol.htm for hours, trying every permutation of order of META tags, XML tag formats (even though it’s an HTML page), etc. (Note: though I have a home-grown share button on the page, I’m talking about sharing the URL of the page in the status box on Facebook itself as the test case.)
All I can get is that all words in the title are capitalized, even though it isn’t specified that way, and the Artist and Album are always Unknown. (For another song/page, "8/9/95", even the title won’t show.) The description also doesn’t show when doing the share, though it does show in the posted story.
I tried searching, and I tried places like ReverbNation and SoundCloud, but nobody seems to use the og:audio tags. (For videos, copying the way YouTube does it appears to work perfectly, http://www.coises.com/songs/risingup.htm being an example.) If I could see just one working example, I suspect I could figure it out.
My own song pages (e.g., http://www.coises.com/songs/floodplain.htm and most other song pages on my site) are now working examples.
It turns out the problem was simple: og:audio:artist and og:audio:album do not work unless og:audio:title is also supplied. I had assumed that would default to og:title; it seems it must be explicitly specified.
The linter still says the og:audio:{title|artist|album} tags are not allowed, but they work.
Those OG tags still seem to be in beta. below I've included the linter results for five different websites that facebook is in partnership with.
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fmog.com%2Fm%2Ftrack%2F57587005
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.deezer.com%2Fmusic%2Ftrack%2F6461440
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.rhapsody.com%2Fartist%2Ftrombone-shorty%2Falbum%2Ffor-true
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.vevo.com%2Fwatch%2Fj-cole-featuring-trey-songz-j-cole-1%2Fcant-get-enough%2FUSQX91101318
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fopen.spotify.com%2Ftrack%2F3ssX20QT5c3nA9wk78V1LQ

Can't find a complete list of default pages for MOSS 2007

I've made a change to what I thought was the main default template page in a hosted version of Sharepoint 2007, but the search page hasn't picked up the change.
Can someone please either give me a list of all the default page files, or tell me how to identify them? It's really important that I add a JS script call across all pages everywhere on the site.
Thanks!
Point of clarification: for now, I'm just trying to include a jQuery reference. I really don't think I'm trying to do anything complicated or unusual - I just want this include to be be global across all pages by default. I've modified /_catalogs/masterpage/default.master with:
<HEAD runat="server">
<script src="/Global%20Site%20Files/jq1.4.2.js" type="text/javascript"></script>
EDIT
I just did a search of the source code for a statically defined meta-tag and found that the default.master I altered is in fact the only file in the search results!!! This means, as far as I understand, that my jQuery include should have worked! I'm more confused than ever...
Hi What i can see is the way you are refrencing is wrong you should use full Qualified URL for
src attribute in script tag currently you are using relative path that might be a cause of error
Turns out that the issue is not a question of multiple page templates or master files. The search results page (which is the primary page in question) does not use the default.master file. Moreover, even as an administrator, I don't have the ability to edit the search results page.
In the end, it looks as though I was looking for what I thought was a solution, but was really just a red herring. I'm going to repost a more specific question to my problem.

Resources