{"id":2295,"date":"2025-06-13T17:30:00","date_gmt":"2025-06-13T21:30:00","guid":{"rendered":"https:\/\/enterpriseadmins.org\/blog\/?p=2295"},"modified":"2025-06-13T14:27:27","modified_gmt":"2025-06-13T18:27:27","slug":"monitoring-a-raspberry-pi-with-telegraf-and-aria-operations","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/virtualization\/monitoring-a-raspberry-pi-with-telegraf-and-aria-operations\/","title":{"rendered":"Monitoring a Raspberry Pi with Telegraf and Aria Operations"},"content":{"rendered":"\n<p>I recently set out to configure the open-source Telegraf agent on a physical system in my lab, with the goal of sending telemetry data to Aria Operations.   The process for setting this up is documented here: <a href=\"https:\/\/techdocs.broadcom.com\/us\/en\/vmware-cis\/aria\/aria-operations\/8-18\/vmware-aria-operations-configuration-guide-8-18\/connect-to-data-sources\/monitoring-applications-and-os-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf-on-a-linux-platform-saas-onprem.html\">https:\/\/techdocs.broadcom.com\/us\/en\/vmware-cis\/aria\/aria-operations\/8-18\/vmware-aria-operations-configuration-guide-8-18\/connect-to-data-sources\/monitoring-applications-and-os-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf-on-a-linux-platform-saas-onprem.html<\/a>.  Since most of my lab systems are virtualized, the only physical candidate available was a Raspberry Pi running Ubuntu 24.04, and with its ARM-based CPU, I wasn&#8217;t sure if it would be supported.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Telegraf on ARM (Ubuntu 24.04)<\/h2>\n\n\n\n<p>The first step was to install telegraf from the appropriate repository.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo curl -fsSL https:\/\/repos.influxdata.com\/influxdata-archive_compat.key -o \/etc\/apt\/keyrings\/influxdata-archive_compat.key\necho \"deb &#91;signed-by=\/etc\/apt\/keyrings\/influxdata-archive_compat.key] https:\/\/repos.influxdata.com\/ubuntu stable main\" | sudo tee \/etc\/apt\/sources.list.d\/influxdata.list\nsudo apt update\nsudo apt -y install telegraf<\/code><\/pre>\n\n\n\n<p>I then needed to download the utility script to help configure telegraf to send to Aria Operations.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget --no-check-certificate https:\/\/cm-opscp-01.lab.enterpriseadmins.org\/downloads\/salt\/telegraf-utils.sh\nchmod +x telegraf-utils.sh<\/code><\/pre>\n\n\n\n<p>The <code>telegraf-utils.sh<\/code> script requires an auth token.  I accessed the Swager UI at <a href=\"https:\/\/ops.example.com\/suite-api\">https:\/\/ops.example.com\/suite-api<\/a> and used the <code>\/auth\/token\/acquire<\/code> endpoint to generate the token.  Here is the body I submitted.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"username\" : \"svc-physvr\",\n  \"password\" : \"VMware1!\"\n}<\/code><\/pre>\n\n\n\n<p>In this case, the <code>svc-physvr<\/code> is a user account created in the Aria Operations UI which maps to a limited access user account.  The response body included the necessary <code>token<\/code> value, which I used when invoking the helper script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo .\/telegraf-utils.sh opensource -c 192.168.45.73 -t 24c884f0-2558-40fa-9626-61f577487ea5::7d209766-11f2-456a-a2d9-2a40b4459920 -v 192.168.45.73 -d \/etc\/telegraf\/telegraf.d -e \/usr\/bin\/telegraf<\/code><\/pre>\n\n\n\n<p>The parameters used in this script are explained in the <a href=\"https:\/\/techdocs.broadcom.com\/us\/en\/vmware-cis\/aria\/aria-operations\/8-18\/vmware-aria-operations-configuration-guide-8-18\/connect-to-data-sources\/monitoring-applications-and-os-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf-on-a-linux-platform-saas-onprem.html\">product documentation<\/a>.<\/p>\n\n\n\n<p>Finally, I restarted the telegraf service.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart telegraf<\/code><\/pre>\n\n\n\n<p>Unfortunately that was met with an error.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Job for telegraf.service failed because the control process exited with error code.\nSee \"systemctl status telegraf.service\" and \"journalctl -xeu telegraf.service\" for details.<\/code><\/pre>\n\n\n\n<p>Looking at the logs, we could see that a certificate could not be read<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo journalctl --no-pager -u telegraf\n\n&#91;...]\nJun  12 19:53:09 rpi-extdns-01 telegraf&#91;1292]: 2025-06-12T18:53:09Z E! loading config file \/etc\/telegraf\/telegraf.d\/cloudproxy-http.conf failed: error parsing http array, could not load certificate \"\/etc\/telegraf\/telegraf.d\/cert.pem\": open \/etc\/telegraf\/telegraf.d\/cert.pem: permission denied\nJun  12 19:53:09 rpi-extdns-01 systemd&#91;1]: telegraf.service: Main process exited, code=exited, status=1\/FAILURE\n&#91;...]<\/code><\/pre>\n\n\n\n<p>I checked permissions on the <code>cert.pem<\/code> file and confirmed it was owned by <code>root<\/code> for user and group.  The same was true for the <code>key.pem<\/code> file.  I adjusted permissions for both files and tried again:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown telegraf:telegraf \/etc\/telegraf\/telegraf.d\/cert.pem\nsudo chown telegraf:telegraf \/etc\/telegraf\/telegraf.d\/key.pem\nsudo systemctl restart telegraf<\/code><\/pre>\n\n\n\n<p>This time no errors occurred.  In short, the Telegraf service was unable to read its TLS certificate files because they were owned by root, but the service runs as the telegraf user. Fixing ownership resolved the issue.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Validating Success in Aria Operations<\/h2>\n\n\n\n<p>After waiting some time, I could see data in Aria Operations for this physical server.  I first searched for the VM name and found an object called &#8220;Linux OS on rpi-extdns-01&#8221; (the servers hostname).  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"125\" src=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-2.png\" alt=\"\" class=\"wp-image-2297\" srcset=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-2.png 577w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-2-300x65.png 300w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/a><\/figure>\n\n\n\n<p>Clicking on that object allowed me to view metrics\/properties which were collected.  For example, the below screenshot shows the disk used over time for the root file system. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"205\" src=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-1.png\" alt=\"\" class=\"wp-image-2296\" srcset=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-1.png 622w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2025\/06\/image-1-300x99.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/a><\/figure>\n\n\n\n<p>More details on this system could be found in the dashboard &#8220;Linux OS discovered by Telegraf.&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>It&#8217;s great to have full visibility into this physical server using the same Aria Operations dashboards and alerts I already rely on for virtual systems. The setup was straightforward, and with a few tweaks for file permissions, the integration worked well even on a low-cost Raspberry Pi with an ARM processor.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently set out to configure the open-source Telegraf agent on a physical system in my lab, with the goal of sending telemetry data to Aria Operations. The process for setting this up is documented here: https:\/\/techdocs.broadcom.com\/us\/en\/vmware-cis\/aria\/aria-operations\/8-18\/vmware-aria-operations-configuration-guide-8-18\/connect-to-data-sources\/monitoring-applications-and-os-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf\/monitoring-applications-using-open-source-telegraf-on-a-linux-platform-saas-onprem.html. Since most of &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/virtualization\/monitoring-a-raspberry-pi-with-telegraf-and-aria-operations\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9,4],"tags":[],"class_list":["post-2295","post","type-post","status-publish","format-standard","hentry","category-lab-infrastructure","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/2295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=2295"}],"version-history":[{"count":2,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/2295\/revisions"}],"predecessor-version":[{"id":2299,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/2295\/revisions\/2299"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=2295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=2295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=2295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}