<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>there was a fish in the calculator</title><id>https://fishinthecalculator.me/feeds/tags/grafana.xml</id><subtitle>Tag: grafana</subtitle><updated>2026-05-05T22:13:01Z</updated><link href="https://fishinthecalculator.me/feeds/tags/grafana.xml" rel="self" /><link href="https://fishinthecalculator.me" /><entry><title>Monitor your Guix System with Grafana</title><id>https://fishinthecalculator.me/blog/monitor-your-guix-system-with-grafana.html</id><author><name>Giacomo Leidi</name><email>therewasa@fishinthecalculator.me</email></author><updated>2023-12-30T16:20:00Z</updated><link href="https://fishinthecalculator.me/blog/monitor-your-guix-system-with-grafana.html" rel="alternate" /><content type="html">&lt;p&gt;If you need to run Grafana on the Guix System this post is the right place. In this example we'll setup Grafana to read metrics from the same machine it's run upon, but you can adapt this to use a remote datasource.&lt;/p&gt;&lt;p&gt;First of all, &lt;a href=&quot;https://github.com/fishinthecalculator/gocix#configure&quot;&gt;add &lt;code&gt;gocix&lt;/code&gt;&lt;/a&gt; to your Guix channels and run &lt;code&gt;guix pull&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;After making sure you have &lt;code&gt;gocix&lt;/code&gt; in your &lt;code&gt;guix describe&lt;/code&gt; output, you just need to add the following services to your &lt;code&gt;operating-system&lt;/code&gt; record and reconfigure your system.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;use-modules&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;oci&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;grafana&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
             &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;oci&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;prometheus&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
             &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;gnu&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;monitoring&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;operating-system&lt;/span&gt;
  &lt;span class=&quot;syntax-open&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;services&lt;/span&gt;
    &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;list&lt;/span&gt;
      &lt;span class=&quot;syntax-open&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;syntax-comment&quot;&gt;;; Prometheus node exporter
&lt;/span&gt;      &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;prometheus-node-exporter-service-type&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;syntax-comment&quot;&gt;;; Prometheus OCI backed Shepherd service
&lt;/span&gt;      &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;oci-prometheus-service-type&lt;/span&gt;
               &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;oci-prometheus-configuration&lt;/span&gt;
                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;network&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;host&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;syntax-comment&quot;&gt;;; Grafana OCI backed Shepherd service
&lt;/span&gt;      &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;oci-grafana-service-type&lt;/span&gt;
               &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;oci-grafana-configuration&lt;/span&gt;
                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;network&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;host&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After you can see both Prometheus and Grafana spawned as Docker containers, such as in this example&lt;/p&gt;&lt;pre&gt;&lt;code&gt;docker ps
CONTAINER ID   IMAGE                     COMMAND                  CREATED          STATUS          PORTS                                                                                  NAMES
fede69fcf4bf   prom/prometheus:v2.45.0   &amp;quot;/bin/prometheus --w…&amp;quot;   26 seconds ago   Up 25 seconds   0.0.0.0:9000-&amp;gt;9000/tcp, :::9000-&amp;gt;9000/tcp, 0.0.0.0:9090-&amp;gt;9090/tcp, :::9090-&amp;gt;9090/tcp   docker-prometheus
caa2dc1f50c0   bitnami/grafana:10.1.5    &amp;quot;/opt/bitnami/script…&amp;quot;   26 seconds ago   Up 25 seconds   0.0.0.0:3000-&amp;gt;3000/tcp, :::3000-&amp;gt;3000/tcp                                              docker-grafana&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;you should be able to visit &lt;a href=&quot;http://localhost:3000&quot;&gt;localhost:3000&lt;/a&gt; and see the Grafana login page.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/images/grafana-login.png&quot; alt=&quot;Grafana's login page&quot; /&gt;&lt;/p&gt;&lt;p&gt;The default credentials are &lt;code&gt;admin:admin&lt;/code&gt;, log in and configure a new datasource with &lt;code&gt;http://localhost:9090&lt;/code&gt; as URL. In this example we'll avoid creating a new dashboard from scratch and we'll import one from the &lt;a href=&quot;https://grafana.com/grafana/dashboards/&quot;&gt;Grafana's website&lt;/a&gt;. Just click on the button to create a new dashboard and choose the import option, paste &lt;code&gt;1860&lt;/code&gt; as the Dashboard ID, select the Prometheus datasource you just created and import the dashboard.&lt;/p&gt;&lt;p&gt;You should be presented with the full data available from the &lt;code&gt;prometheus-node-exporter-service-type&lt;/code&gt; by default.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/images/grafana-dashboard.png&quot; alt=&quot;Grafana's Node Exporter Full dashboard&quot; /&gt;&lt;/p&gt;</content></entry></feed>