{"id":1352,"date":"2023-07-29T12:38:19","date_gmt":"2023-07-29T17:38:19","guid":{"rendered":"https:\/\/www.nathanhunstad.com\/blog\/?p=1352"},"modified":"2023-07-29T12:38:19","modified_gmt":"2023-07-29T17:38:19","slug":"monitor-your-ups-with-logstash-the-easy-way","status":"publish","type":"post","link":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/","title":{"rendered":"Monitor your UPS with  Logstash the easy way"},"content":{"rendered":"\n<p>Many years ago, I wrote a blog post about <a href=\"https:\/\/www.nathanhunstad.com\/blog\/2015\/05\/monitoring-my-ups-with-splunk\/\" target=\"_blank\" rel=\"noopener\" title=\"\">monitoring my UPS with Splunk<\/a>. Since then, I&#8217;ve moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze.<\/p>\n\n\n\n<p>The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the UPS and the connectivity, in this case a USB connection. Then, I had to modify the <code>upslog.service<\/code> file to get it to start and monitor the correct UPS device, then output it to <code>\/var\/log\/ups.log<\/code>. Honestly, that was the hardest part of the configuration. From here, it was a breeze.<\/p>\n\n\n\n<p>Once upslog was outputting data to the log file, I simply created a logstash config to read it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>input {\n    file {\n        path =&gt; \"\/var\/log\/ups.log\"\n        tags =&gt; &#91; \"ups\" ]\n    }\n\n}<\/code><\/pre>\n\n\n\n<p>Then, this grok filter parses out all the appropriate fields:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>filter {\n  ...\n  else if \"ups\" in &#91;tags] {\n    grok {\n      match =&gt; {\n        message =&gt; &#91; \"^%{DATA:rawdate} %{DATA:rawtime} %{INT:battery.charge} %{NUMBER:battery.volts:float} %{INT:battery.load} \\&#91;%{DATA:battery.status}\\] %{GREEDYDATA}$\" ]\n      }\n      add_tag =&gt; &#91; \"ups_parsed\" ]\n    }\n    mutate {\n      copy =&gt; {\n        \"message\" =&gt; \"log.original\"\n      }\n      rename =&gt; {\n        \"host\" =&gt; \"host.hostname\"\n        \"path\" =&gt; \"file.name\"\n      }\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p>This is directed into a datastream in Elastic:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>output {\n  ...\n  else if \"ups\" in &#91;tags] {\n    elasticsearch {\n      hosts =&gt; &#91; \"192.168.2.12:9200\" ]\n      index =&gt; \"logstash-ups\"\n      manage_template =&gt; false\n      user =&gt; logstash_writer\n      password =&gt; xxxxxxxxxxxxxxxx\n      action =&gt; \"create\"\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p>I&#8217;m a big fan of the <a href=\"https:\/\/github.com\/elastic\/ecs\" target=\"_blank\" rel=\"noopener\" title=\"\">Elastic Common Schema<\/a> (ECS), and I&#8217;ve extended it where necessary, such as this mapping for the UPS battery fields:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n{\n  \"_meta\": {\n    \"version\": \"1.5.0\"\n  },\n  \"date_detection\": false,\n  \"dynamic_templates\": &#91;\n    {\n      \"strings_as_keyword\": {\n        \"mapping\": {\n          \"ignore_above\": 1024,\n          \"type\": \"keyword\"\n        },\n        \"match_mapping_type\": \"string\"\n      }\n    }\n  ],\n  \"properties\": {\n    \"@timestamp\": {\n      \"type\": \"date\"\n    },\n    \"battery\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"charge\": {\n          \"type\": \"integer\"\n        },\n        \"load\": {\n          \"type\": \"integer\"\n        },\n        \"status\": {\n          \"type\": \"keyword\"\n        },\n        \"volts\": {\n          \"type\": \"float\"\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p>Putting all of that together, I get parsed, well-formatted data that allows me to monitor my UPS on a custom dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"456\" src=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-1024x456.png\" alt=\"\" class=\"wp-image-1353\" srcset=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-1024x456.png 1024w, https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-300x134.png 300w, https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-768x342.png 768w, https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-1536x685.png 1536w, https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-2048x913.png 2048w, https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-1568x699.png 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I&#8217;ve moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the&hellip; <a class=\"more-link\" href=\"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/\">Continue reading <span class=\"screen-reader-text\">Monitor your UPS with  Logstash the easy way<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1352","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I&#039;ve moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Nathan Hunstad\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"The blog of Nathan Hunstad |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad\" \/>\n\t\t<meta property=\"og:description\" content=\"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I&#039;ve moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"484\" \/>\n\t\t<meta property=\"og:image:height\" content=\"258\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-07-29T17:38:19+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-07-29T17:38:19+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I&#039;ve moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#article\",\"name\":\"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad\",\"headline\":\"Monitor your UPS with  Logstash the easy way\",\"author\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/author\\\/huns0004\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/image-1024x456.png\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#articleImage\"},\"datePublished\":\"2023-07-29T12:38:19-05:00\",\"dateModified\":\"2023-07-29T12:38:19-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#webpage\"},\"articleSection\":\"Uncategorized\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/category\\\/uncategorized\\\/#listItem\",\"position\":2,\"name\":\"Uncategorized\",\"item\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/category\\\/uncategorized\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#listItem\",\"name\":\"Monitor your UPS with  Logstash the easy way\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#listItem\",\"position\":3,\"name\":\"Monitor your UPS with  Logstash the easy way\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/#person\",\"name\":\"Nathan Hunstad\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c5113ffdbe47c3095654b9158d4f067a549f1c82013a3f3c5dd7773d3f4b5be0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Nathan Hunstad\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/author\\\/huns0004\\\/#author\",\"url\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/author\\\/huns0004\\\/\",\"name\":\"Nathan Hunstad\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c5113ffdbe47c3095654b9158d4f067a549f1c82013a3f3c5dd7773d3f4b5be0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Nathan Hunstad\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#webpage\",\"url\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/\",\"name\":\"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad\",\"description\":\"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I've moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/2023\\\/07\\\/monitor-your-ups-with-logstash-the-easy-way\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/author\\\/huns0004\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/author\\\/huns0004\\\/#author\"},\"datePublished\":\"2023-07-29T12:38:19-05:00\",\"dateModified\":\"2023-07-29T12:38:19-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/\",\"name\":\"The blog of Nathan Hunstad\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.nathanhunstad.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad","description":"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I've moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the","canonical_url":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#article","name":"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad","headline":"Monitor your UPS with  Logstash the easy way","author":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/author\/huns0004\/#author"},"publisher":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/07\/image-1024x456.png","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#articleImage"},"datePublished":"2023-07-29T12:38:19-05:00","dateModified":"2023-07-29T12:38:19-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#webpage"},"isPartOf":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#webpage"},"articleSection":"Uncategorized"},{"@type":"BreadcrumbList","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.nathanhunstad.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/#listItem","name":"Uncategorized"}},{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/#listItem","position":2,"name":"Uncategorized","item":"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#listItem","name":"Monitor your UPS with  Logstash the easy way"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#listItem","position":3,"name":"Monitor your UPS with  Logstash the easy way","previousItem":{"@type":"ListItem","@id":"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/#listItem","name":"Uncategorized"}}]},{"@type":"Person","@id":"https:\/\/www.nathanhunstad.com\/blog\/#person","name":"Nathan Hunstad","image":{"@type":"ImageObject","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/c5113ffdbe47c3095654b9158d4f067a549f1c82013a3f3c5dd7773d3f4b5be0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Nathan Hunstad"}},{"@type":"Person","@id":"https:\/\/www.nathanhunstad.com\/blog\/author\/huns0004\/#author","url":"https:\/\/www.nathanhunstad.com\/blog\/author\/huns0004\/","name":"Nathan Hunstad","image":{"@type":"ImageObject","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/c5113ffdbe47c3095654b9158d4f067a549f1c82013a3f3c5dd7773d3f4b5be0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Nathan Hunstad"}},{"@type":"WebPage","@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#webpage","url":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/","name":"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad","description":"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I've moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/#breadcrumblist"},"author":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/author\/huns0004\/#author"},"creator":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/author\/huns0004\/#author"},"datePublished":"2023-07-29T12:38:19-05:00","dateModified":"2023-07-29T12:38:19-05:00"},{"@type":"WebSite","@id":"https:\/\/www.nathanhunstad.com\/blog\/#website","url":"https:\/\/www.nathanhunstad.com\/blog\/","name":"The blog of Nathan Hunstad","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.nathanhunstad.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"The blog of Nathan Hunstad |","og:type":"article","og:title":"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad","og:description":"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I've moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the","og:url":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/","og:image":"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg","og:image:secure_url":"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg","og:image:width":484,"og:image:height":258,"article:published_time":"2023-07-29T17:38:19+00:00","article:modified_time":"2023-07-29T17:38:19+00:00","twitter:card":"summary","twitter:title":"Monitor your UPS with Logstash the easy way | The blog of Nathan Hunstad","twitter:description":"Many years ago, I wrote a blog post about monitoring my UPS with Splunk. Since then, I've moved away from Splunk to the Elastic stack. Fortunately, moving that monitoring over was pretty much a breeze. The information is still coming from upslog, which is bundled in with nut. FIrst, I configured nut to define the","twitter:image":"https:\/\/www.nathanhunstad.com\/blog\/wp-content\/uploads\/2023\/05\/facicon-stretched.jpg"},"aioseo_meta_data":{"post_id":"1352","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-04 18:09:18","updated":"2025-06-04 06:07:13","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nathanhunstad.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/\" title=\"Uncategorized\">Uncategorized<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMonitor your UPS with  Logstash the easy way\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.nathanhunstad.com\/blog"},{"label":"Uncategorized","link":"https:\/\/www.nathanhunstad.com\/blog\/category\/uncategorized\/"},{"label":"Monitor your UPS with  Logstash the easy way","link":"https:\/\/www.nathanhunstad.com\/blog\/2023\/07\/monitor-your-ups-with-logstash-the-easy-way\/"}],"_links":{"self":[{"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/posts\/1352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/comments?post=1352"}],"version-history":[{"count":2,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/posts\/1352\/revisions"}],"predecessor-version":[{"id":1356,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/posts\/1352\/revisions\/1356"}],"wp:attachment":[{"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/media?parent=1352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/categories?post=1352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nathanhunstad.com\/blog\/wp-json\/wp\/v2\/tags?post=1352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}