Deprecated: Funksjonen jetpack_form_register_pattern er foreldet siden versjon jetpack-13.4! Bruk Automattic\Jetpack\Forms\ContactForm\Util::register_pattern i stedet. in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php on line 6078 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 Warning: Cannot modify header information - headers already sent by (output started at /customers/8/5/b/vedaa.net/httpd.www/wp-includes/functions.php:6078) in /customers/8/5/b/vedaa.net/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1831 {"id":1060,"date":"2022-03-25T11:09:31","date_gmt":"2022-03-25T09:09:31","guid":{"rendered":"https:\/\/vedaa.net\/?p=1060"},"modified":"2022-03-29T13:07:17","modified_gmt":"2022-03-29T11:07:17","slug":"using-regex-to-create-custom-dns-alert-in-vrealize-operations","status":"publish","type":"post","link":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/","title":{"rendered":"Using RegEx to create custom DNS alert in vRealize Operations"},"content":{"rendered":"\n

I recently got a question on how to use regex within vRealize Operations to make a symptom if DNS server settings on a host is incorrect. I did a quick google search and found out that info on regex and vROps wasn’t easily available. So here is a litte write up on the process.<\/p>\n\n\n\n

Create the Symptom<\/h2>\n\n\n\n

First we need to create a symptom
Go to Configure<\/strong>, Alerts<\/strong>, Symptom Definitions<\/strong> and choose ADD<\/strong>
In the Add Symptom Definition<\/strong> view change Base Object Type <\/strong>to Host System and Symptom Type<\/strong> to Properties. In Select Specific Object <\/strong>expand Configuration<\/strong>, Network<\/strong> and double click on DNS Server<\/strong>. <\/p>\n\n\n\n

Give the Symptom a resonable Name<\/strong> and on the If Property <\/strong>choose Does not match regular expression<\/strong>. In the Property value<\/strong> field you should now see the value we need to match. <\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

In my case the correct config is [192.168.10.20, 192.168.6.10] so I created a regex that will match on this value. There is probably other ways to create the regex but this worked for me. Regex example:<\/strong> \\D192.168.10.20, 192.168.6.10\\D<\/p>\n\n\n\n

When that is done remember to set wanted Criticality<\/strong> and then save<\/strong>.<\/p>\n\n\n\n

Create Alert Definitions<\/h2>\n\n\n\n

When that is done you can create your alert definitions and use the new symptom. (no step, by step guidance here)<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

More advanced reqex<\/h2>\n\n\n\n

In my simple lab setup this regex was doing its job, but for a live production environment it might not be the case, what if some servers have the DNS configured in the opposite way? Then my regex won’t match.<\/p>\n\n\n\n

That brings me to the customer use case brought to me by Bernt Christian Torbj\u00f8rnsen<\/strong>, a vRealize Operations admin and virtualization evangelist. When combining my testing, some brainstorming and a screen sharing session with some trail and error we managed to tweak his regex to work within vROps and this is the code we ended up with.<\/p>\n\n\n\n

RegEx: <\/strong>\\D\\b192.168.10.20\\b.\\b192.168.10.10\\b\\D|\\D\\b192.168.10.10\\b.<\/em>\\b192.168.10.20\\b\\D<\/p>\n\n\n\n

This regex will result in match if DNS servers is configure in any of thees to ways.
[192.168.10.20, 192.168.6.10] or [192.168.10.10, 192.168.6.20]<\/p>\n\n\n\n

Hot Tip<\/h3>\n\n\n\n

If you want to test your expression quicker than waiting for vROps collection cycles, you can create a custom group instead and use your regex there to get instant preview.<\/em><\/p>\n\n\n\n

In vRealize Operations it seems like we need to match the whole string including [ ] to get a match [192.168.10.20, 192.168.6.10]<\/em><\/p>\n\n\n\n

Reference<\/h2>\n\n\n\n

https:\/\/regex101.com<\/a>
Log Insight, Examples of Regular Expressions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

I recently got a question on how to use regex within vRealize Operations to make a symptom if DNS server settings on a host is incorrect. I did a quick google search and found out that info on regex and vROps wasn’t easily available. So here is a litte write up on the process. Create […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[98,97,96,99,29,54,55],"yoast_head":"\nUsing RegEx to create custom DNS alert in vRealize Operations - Vedaa.net<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\" \/>\n<meta property=\"og:locale\" content=\"nb_NO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using RegEx to create custom DNS alert in vRealize Operations - Vedaa.net\" \/>\n<meta property=\"og:description\" content=\"I recently got a question on how to use regex within vRealize Operations to make a symptom if DNS server settings on a host is incorrect. I did a quick google search and found out that info on regex and vROps wasn’t easily available. So here is a litte write up on the process. Create […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\" \/>\n<meta property=\"og:site_name\" content=\"Vedaa.net\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-25T09:09:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-29T11:07:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png\" \/>\n<meta name=\"author\" content=\"Andreas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Skrevet av\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andreas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Ansl. lesetid\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\"},\"author\":{\"name\":\"Andreas\",\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f\"},\"headline\":\"Using RegEx to create custom DNS alert in vRealize Operations\",\"datePublished\":\"2022-03-25T09:09:31+00:00\",\"dateModified\":\"2022-03-29T11:07:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\"},\"wordCount\":409,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f\"},\"image\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png\",\"keywords\":[\"Alert\",\"DNS\",\"RegEx\",\"Symptom\",\"vRealize\",\"vRealize Operations Manager\",\"vRops\"],\"articleSection\":[\"VMware\"],\"inLanguage\":\"nb-NO\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\",\"url\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\",\"name\":\"Using RegEx to create custom DNS alert in vRealize Operations - Vedaa.net\",\"isPartOf\":{\"@id\":\"https:\/\/vedaa.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png\",\"datePublished\":\"2022-03-25T09:09:31+00:00\",\"dateModified\":\"2022-03-29T11:07:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#breadcrumb\"},\"inLanguage\":\"nb-NO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nb-NO\",\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage\",\"url\":\"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1.png\",\"contentUrl\":\"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1.png\",\"width\":1355,\"height\":459},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hjem\",\"item\":\"https:\/\/vedaa.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using RegEx to create custom DNS alert in vRealize Operations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vedaa.net\/#website\",\"url\":\"https:\/\/vedaa.net\/\",\"name\":\"Vedaa.net\",\"description\":\"Teknologi og VMware\",\"publisher\":{\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vedaa.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"nb-NO\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f\",\"name\":\"Andreas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nb-NO\",\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/02e1b668c9192e27e9ba04f589c3c2d1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/02e1b668c9192e27e9ba04f589c3c2d1?s=96&d=mm&r=g\",\"caption\":\"Andreas\"},\"logo\":{\"@id\":\"https:\/\/vedaa.net\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using RegEx to create custom DNS alert in vRealize Operations - Vedaa.net","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/","og_locale":"nb_NO","og_type":"article","og_title":"Using RegEx to create custom DNS alert in vRealize Operations - Vedaa.net","og_description":"I recently got a question on how to use regex within vRealize Operations to make a symptom if DNS server settings on a host is incorrect. I did a quick google search and found out that info on regex and vROps wasn’t easily available. So here is a litte write up on the process. Create […]","og_url":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/","og_site_name":"Vedaa.net","article_published_time":"2022-03-25T09:09:31+00:00","article_modified_time":"2022-03-29T11:07:17+00:00","og_image":[{"url":"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png"}],"author":"Andreas","twitter_card":"summary_large_image","twitter_misc":{"Skrevet av":"Andreas","Ansl. lesetid":"3 minutter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#article","isPartOf":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/"},"author":{"name":"Andreas","@id":"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f"},"headline":"Using RegEx to create custom DNS alert in vRealize Operations","datePublished":"2022-03-25T09:09:31+00:00","dateModified":"2022-03-29T11:07:17+00:00","mainEntityOfPage":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/"},"wordCount":409,"commentCount":0,"publisher":{"@id":"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f"},"image":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage"},"thumbnailUrl":"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png","keywords":["Alert","DNS","RegEx","Symptom","vRealize","vRealize Operations Manager","vRops"],"articleSection":["VMware"],"inLanguage":"nb-NO","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/","url":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/","name":"Using RegEx to create custom DNS alert in vRealize Operations - Vedaa.net","isPartOf":{"@id":"https:\/\/vedaa.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage"},"image":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage"},"thumbnailUrl":"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1-1024x347.png","datePublished":"2022-03-25T09:09:31+00:00","dateModified":"2022-03-29T11:07:17+00:00","breadcrumb":{"@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#breadcrumb"},"inLanguage":"nb-NO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/"]}]},{"@type":"ImageObject","inLanguage":"nb-NO","@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#primaryimage","url":"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1.png","contentUrl":"https:\/\/vedaa.net\/wp-content\/uploads\/2022\/03\/image-1.png","width":1355,"height":459},{"@type":"BreadcrumbList","@id":"https:\/\/vedaa.net\/vmware\/using-regex-to-create-custom-dns-alert-in-vrealize-operations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hjem","item":"https:\/\/vedaa.net\/"},{"@type":"ListItem","position":2,"name":"Using RegEx to create custom DNS alert in vRealize Operations"}]},{"@type":"WebSite","@id":"https:\/\/vedaa.net\/#website","url":"https:\/\/vedaa.net\/","name":"Vedaa.net","description":"Teknologi og VMware","publisher":{"@id":"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vedaa.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"nb-NO"},{"@type":["Person","Organization"],"@id":"https:\/\/vedaa.net\/#\/schema\/person\/d2a156311759fc0f7b90118237bc649f","name":"Andreas","image":{"@type":"ImageObject","inLanguage":"nb-NO","@id":"https:\/\/vedaa.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/02e1b668c9192e27e9ba04f589c3c2d1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/02e1b668c9192e27e9ba04f589c3c2d1?s=96&d=mm&r=g","caption":"Andreas"},"logo":{"@id":"https:\/\/vedaa.net\/#\/schema\/person\/image\/"}}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/posts\/1060"}],"collection":[{"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/comments?post=1060"}],"version-history":[{"count":8,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/posts\/1060\/revisions"}],"predecessor-version":[{"id":1071,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/posts\/1060\/revisions\/1071"}],"wp:attachment":[{"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/media?parent=1060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/categories?post=1060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vedaa.net\/wp-json\/wp\/v2\/tags?post=1060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}