Files
unRAID-CA-templates/templates/prometheus.xml
Levi Govaerts 963e0a5e91 Prometheus: fix permission error on data folder
I kept getting a fatal error when trying to start Prometheus. After doing some investigating, I noticed that Docker added the data folder to the root of `/prometheus` instead of `/prometheus/data`. 

After updating the path, it works like a charm.

This was the error:

```
caller=query_logger.go:86 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"


panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffc79a57eac, 0xb}, 0x14, {0x3547580, 0xc00080f540})
/app/promql/query_logger.go:116 +0x3d7
main.main()
/app/cmd/prometheus/main.go:567 +0x5c93
```
2022-09-19 14:31:10 +02:00

19 lines
1.5 KiB
XML

<?xml version="1.0"?>
<Container version="2">
<Name>prometheus</Name>
<Repository>prom/prometheus</Repository>
<Registry>https://hub.docker.com/r/prom/prometheus/</Registry>
<Network>bridge</Network>
<Privileged>false</Privileged>
<Support>https://forums.unraid.net/topic/87798-support-selfhostersnets-template-repository/</Support>
<Project>https://github.com/prometheus/prometheus</Project>
<Overview>Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.</Overview>
<WebUI>http://[IP]:[PORT:9090]</WebUI>
<Category>Productivity:</Category>
<TemplateURL>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/prometheus.xml</TemplateURL>
<Icon>https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/prometheus.png</Icon>
<Config Name="Port" Target="9090" Default="9090" Mode="tcp" Description="Container Port: 9090" Type="Port" Display="always" Required="false" Mask="false"/>
<Config Name="Appdata" Target="/prometheus/data" Default="/mnt/user/appdata/prometheus/data" Mode="rw" Description="Appdata directory" Type="Path" Display="advanced" Required="true" Mask="false"/>
<Config Name="Config" Target="/etc/prometheus/" Default="/mnt/user/appdata/prometheus/etc" Mode="rw" Description="Config directory" Type="Path" Display="advanced" Required="true" Mask="false"/>
</Container>