{"id":6385,"date":"2019-05-21T11:05:10","date_gmt":"2019-05-21T17:05:10","guid":{"rendered":"https:\/\/kevinjustin.com\/blog\/?p=6385"},"modified":"2021-11-08T11:27:54","modified_gmt":"2021-11-08T15:27:54","slug":"using-unix-mps-for-shell-commands-and-scripts","status":"publish","type":"post","link":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/","title":{"rendered":"Using Unix MP&#8217;s for Shell commands and scripts"},"content":{"rendered":"<p>Ready to move out of the UI ?<\/p>\n<p>Thanks to Saurav Babu,\u00a0and\u00a0Tim Helton&#8217;s help, I was able to push my MP authoring limits further.<\/p>\n<p>The good thing with the Shell command template in SCOM is that your script is encoded.<\/p>\n<p><a href=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/UnitMonitor-Template-Scripting-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6408 size-full\" src=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/UnitMonitor-Template-Scripting-2.png\" alt=\"\" width=\"862\" height=\"728\" srcset=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/UnitMonitor-Template-Scripting-2.png 862w, https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/UnitMonitor-Template-Scripting-2-300x253.png 300w, https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/UnitMonitor-Template-Scripting-2-768x649.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<h3>Bad news<\/h3>\n<ol>\n<li>If functionality doesn&#8217;t exist in the UI, you can&#8217;t easily pull the monitor and just add variables to get that functionality.<\/li>\n<li>Scripts and Shell commands are encoded (great news for security!)<\/li>\n<\/ol>\n<p>Now to the use case &#8211; need Sample Count and Match Count to prevent false positive alerts<\/p>\n<p>The UNIX Shell Command library allows us to use the following variables out of the box:<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\">Interval, SyncTime, TargetSystem, UserName, Password, Script, ScriptArgs, TimeOut, TimeOutInMS, HealthyExpression, ErrorExpression<\/span><\/p>\n<p style=\"padding-left: 60px;\">AND we can override <span style=\"color: #0000ff;\">Interval, Script, TimeOut, TimeOutInMS<\/span><\/p>\n<p>If that&#8217;s not enough options, then read on!<\/p>\n<h2>When the built-in functionality doesn&#8217;t exist<\/h2>\n<p>For this UNIX shell command\/script monitor, we\u00a0required SampleCount and MatchCount<\/p>\n<p><strong>Variables explained<\/strong><\/p>\n<p>SampleCount is the number of times (samples for an alert).<\/p>\n<p style=\"padding-left: 30px;\">If SampleCount = 4, this means 4 samples will generate an alert<\/p>\n<p>MatchCount is the number of intervals before monitor state changes<\/p>\n<p style=\"padding-left: 30px;\">If Interval = 60 (s), and MatchCount = 10, then it will take 10 minutes (600s before we alert)<\/p>\n<p>Combining the 2 means 4 samples over 10 minutes will generate an alert.<\/p>\n<p>Sometimes this is called alert suppression or counting failures before alerting<\/p>\n<p>Built a custom DataSource, ProbeAction, and WriteAction, as the UNIX Shell Library MP did not include these additional variables.<\/p>\n<p>Please review my updated MP Fragments TechNet Gallery for the custom MP and fragments!<\/p>\n<p><a href=\"https:\/\/gallery.technet.microsoft.com\/Uncommon-Custom-MP-c5a12a86\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/gallery.technet.microsoft.com\/Uncommon-Custom-MP-c5a12a86<\/a><\/p>\n<h2>Encoding the script or command to run<\/h2>\n<p>The other issue with UNIX scripts and commands, is the UI encodes the scripts.<\/p>\n<p>How do we get around it you ask?<\/p>\n<p>Since we are building an MP Fragment and MP, we must figure out how to encode.<\/p>\n<p>To encode the script to put into your SCOM monitor (and MP Fragment)<\/p>\n<p><strong>Example<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">$script = &#8216;if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq &#8220;1&#8221; ]; then echo false; <\/span><span style=\"color: #0000ff;\">else echo true; fi&#8217;<\/span><\/p>\n<p># Verify script variable<br \/>\n<span style=\"color: #0000ff;\">$script<\/span><\/p>\n<p># Get $script bytes<br \/>\n<span style=\"color: #0000ff;\">$s = [System.Text.Encoding]::UTF8.GetBytes($script)<\/span><\/p>\n<p># Verify script bytes output (optional as bytes broken out by line)<br \/>\n<span style=\"color: #0000ff;\">$s<\/span><\/p>\n<p># Encode script to Base64<br \/>\n<span style=\"color: #0000ff;\">$encoded = [System.Convert]::ToBase64String($s)<\/span><\/p>\n<p># Verify $encoded<br \/>\n<span style=\"color: #0000ff;\">$encoded<\/span><\/p>\n<p># Optional<br \/>\n# Verify string converts back properly<br \/>\n<span style=\"color: #0000ff;\">[System.Text.Encoding]::UTF8.GetString($s)<\/span><\/p>\n<pre><span style=\"color: #0000ff;\">$encoded<\/span> output is what needs to be entered into the &lt;script&gt;&lt;\/script&gt; variable in your monitor<\/pre>\n<h3>Example Output<\/h3>\n<p>PS C:\\Users\\scomadmin\\desktop&gt; $script = &#8216;if [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq &#8220;1&#8221; ]; then echo false;<br \/>\nelse echo true; fi&#8217;<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; $script<br \/>\nif [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq &#8220;1&#8221; ]; then echo false; else echo true; fi<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; $s = [System.Text.Encoding]::UTF8.GetBytes($script)<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; $s<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; $s = [System.Text.Encoding]::UTF8.GetBytes($script)<\/p>\n<p>PS C:\\Users\\scomadmin\\desktop&gt; $encoded = [System.Convert]::ToBase64String($s)<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; $encoded<br \/>\n<span style=\"color: #0000ff;\">aWYgWyBgcHMgLWVmIHwgZ3JlcCBzbGVlcCB8IGdyZXAgLXYgZ3JlcCB8IHdjIC1sYCAtZXEgIjEiIF07IHRoZW4gZWNobyBmYWxzZTsgZWxzZSBlY2hvIHRydWU7IGZp<\/span><br \/>\nPS C:\\Users\\scomadmin\\desktop&gt; [System.Text.Encoding]::UTF8.GetString($s)<br \/>\nif [ `ps -ef | grep sleep | grep -v grep | wc -l` -eq &#8220;1&#8221; ]; then echo false; else echo true; fi<br \/>\nPS C:\\Users\\scomadmin\\desktop&gt;<\/p>\n<p><strong>References<\/strong><\/p>\n<p>Jonathan Almquist&#8217;s blog <a href=\"http:\/\/blog.scomskills.com\/new-matchcount-configuration-in-scom-2012\/\" target=\"_blank\" rel=\"noopener noreferrer\">post<\/a><\/p>\n<p>Kevin Holman&#8217;s <a href=\"https:\/\/kevinholman.com\/2017\/08\/12\/creating-a-scom-service-monitor-that-allows-overrides-for-interval-frequency-and-samples\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog<\/a> on service with Samples<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ready to move out of the UI ? Thanks to Saurav Babu,\u00a0and\u00a0Tim Helton&#8217;s help, I was able to push my MP authoring limits further. The good thing with the Shell command template in SCOM is that your script is encoded. Bad news If functionality doesn&#8217;t exist in the UI, you can&#8217;t easily pull the monitor &hellip; <a href=\"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using Unix MP&#8217;s for Shell commands and scripts&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":6407,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,12],"tags":[223,240,244,247,342,392,432,435,461],"class_list":["post-6385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration","category-mp-management-pack","category-unix","tag-management-pack","tag-monitor","tag-mp-authoring","tag-mp-fragments","tag-scom","tag-shell-command","tag-system-center","tag-system-center-operations-manager","tag-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Unix MP&#039;s for Shell commands and scripts - Kevin Justin&#039;s Blog<\/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:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Unix MP&#039;s for Shell commands and scripts - Kevin Justin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Ready to move out of the UI ? Thanks to Saurav Babu,\u00a0and\u00a0Tim Helton&#8217;s help, I was able to push my MP authoring limits further. The good thing with the Shell command template in SCOM is that your script is encoded. Bad news If functionality doesn&#8217;t exist in the UI, you can&#8217;t easily pull the monitor &hellip; Continue reading &quot;Using Unix MP&#8217;s for Shell commands and scripts&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/\" \/>\n<meta property=\"og:site_name\" content=\"Kevin Justin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-21T17:05:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-08T15:27:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"312\" \/>\n\t<meta property=\"og:image:height\" content=\"240\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kevin Justin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kevin Justin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/\"},\"author\":{\"name\":\"Kevin Justin\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/213cdc5c6c3f2a1d9e8417c07440972d\"},\"headline\":\"Using Unix MP&#8217;s for Shell commands and scripts\",\"datePublished\":\"2019-05-21T17:05:10+00:00\",\"dateModified\":\"2021-11-08T15:27:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/\"},\"wordCount\":566,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/moving-2.jpg\",\"keywords\":[\"management pack\",\"monitor\",\"mp authoring\",\"mp fragments\",\"SCOM\",\"shell command\",\"System Center\",\"system center operations manager\",\"unix\"],\"articleSection\":[\"Administration\",\"MP Management Pack\",\"UNIX\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/\",\"name\":\"Using Unix MP's for Shell commands and scripts - Kevin Justin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/moving-2.jpg\",\"datePublished\":\"2019-05-21T17:05:10+00:00\",\"dateModified\":\"2021-11-08T15:27:54+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/213cdc5c6c3f2a1d9e8417c07440972d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/moving-2.jpg\",\"contentUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/moving-2.jpg\",\"width\":312,\"height\":240},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2019\\\/05\\\/21\\\/using-unix-mps-for-shell-commands-and-scripts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Unix MP&#8217;s for Shell commands and scripts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/\",\"name\":\"Kevin Justin&#039;s Blog\",\"description\":\"Operational monitoring tools including System Center, Azure Monitor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/213cdc5c6c3f2a1d9e8417c07440972d\",\"name\":\"Kevin Justin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g\",\"caption\":\"Kevin Justin\"},\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/author\\\/kejustin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Unix MP's for Shell commands and scripts - Kevin Justin&#039;s Blog","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:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/","og_locale":"en_US","og_type":"article","og_title":"Using Unix MP's for Shell commands and scripts - Kevin Justin&#039;s Blog","og_description":"Ready to move out of the UI ? Thanks to Saurav Babu,\u00a0and\u00a0Tim Helton&#8217;s help, I was able to push my MP authoring limits further. The good thing with the Shell command template in SCOM is that your script is encoded. Bad news If functionality doesn&#8217;t exist in the UI, you can&#8217;t easily pull the monitor &hellip; Continue reading \"Using Unix MP&#8217;s for Shell commands and scripts\"","og_url":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/","og_site_name":"Kevin Justin&#039;s Blog","article_published_time":"2019-05-21T17:05:10+00:00","article_modified_time":"2021-11-08T15:27:54+00:00","og_image":[{"width":312,"height":240,"url":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg","type":"image\/jpeg"}],"author":"Kevin Justin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kevin Justin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#article","isPartOf":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/"},"author":{"name":"Kevin Justin","@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/213cdc5c6c3f2a1d9e8417c07440972d"},"headline":"Using Unix MP&#8217;s for Shell commands and scripts","datePublished":"2019-05-21T17:05:10+00:00","dateModified":"2021-11-08T15:27:54+00:00","mainEntityOfPage":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/"},"wordCount":566,"commentCount":0,"image":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg","keywords":["management pack","monitor","mp authoring","mp fragments","SCOM","shell command","System Center","system center operations manager","unix"],"articleSection":["Administration","MP Management Pack","UNIX"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/","url":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/","name":"Using Unix MP's for Shell commands and scripts - Kevin Justin&#039;s Blog","isPartOf":{"@id":"https:\/\/kevinjustin.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#primaryimage"},"image":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#primaryimage"},"thumbnailUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg","datePublished":"2019-05-21T17:05:10+00:00","dateModified":"2021-11-08T15:27:54+00:00","author":{"@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/213cdc5c6c3f2a1d9e8417c07440972d"},"breadcrumb":{"@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#primaryimage","url":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg","contentUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2019\/05\/moving-2.jpg","width":312,"height":240},{"@type":"BreadcrumbList","@id":"https:\/\/kevinjustin.com\/blog\/2019\/05\/21\/using-unix-mps-for-shell-commands-and-scripts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kevinjustin.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Unix MP&#8217;s for Shell commands and scripts"}]},{"@type":"WebSite","@id":"https:\/\/kevinjustin.com\/blog\/#website","url":"https:\/\/kevinjustin.com\/blog\/","name":"Kevin Justin&#039;s Blog","description":"Operational monitoring tools including System Center, Azure Monitor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kevinjustin.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/213cdc5c6c3f2a1d9e8417c07440972d","name":"Kevin Justin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4c2a0d1189dd1ad7f305cf08aa9c5e2d4cc8fc26fde7ca573d3fd7e75520334e?s=96&d=mm&r=g","caption":"Kevin Justin"},"url":"https:\/\/kevinjustin.com\/blog\/author\/kejustin\/"}]}},"_links":{"self":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/6385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/comments?post=6385"}],"version-history":[{"count":9,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/6385\/revisions"}],"predecessor-version":[{"id":6899,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/6385\/revisions\/6899"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/media\/6407"}],"wp:attachment":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/media?parent=6385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/categories?post=6385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/tags?post=6385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}