# Local Install Ubuntu 22.04 Grafana has no logs

**URL:** <https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916>\
**Category:** Configuration\
**Created:** [March 9, 2025, 4:13pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916 "2025-03-09T16:13:27Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 4:13pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/1 "2025-03-09T16:13:27Z")

</div>

Local Install:

Ubuntu 22.04 LTS  
I’ve installed  
`$sudo apt install Grafana Loki Alloy`  
via APT after adding Grafana’s repo and gpg keys.

Goals:  
I only have this one computer and want the ability to view and visualize the logs.

Auditd Logs:  
This is the main purpose, review and possibly alert on events.  
204 keys in my audit.rules file

Is there a way to track the ‘Key=’ names and combine related ones for quick view?

How can I set alerts on relevant activity for LOTL methods in my audit.rules file?

Purpose:  
Detecting events when someone is running shell scripts, setting up reverse shells, installing to RAM things like mfsconsole, changing the firewall settings/rules, loading or unloading the firewall, disabling systemd firewall features or other systemd services, any of the GTFObins, modifying running processes (browser/login screen)…maybe other issues.

So Far:  
I have Grafana running, localhost:3000.  
I have Alloy.config with the primary 4 listed from the document,  
“[grafana.com](http://grafana.com) docs tutorials/send-logs-to-loki”

There is no information showing in the Grafana page.  
In Alloy my target path is ` __PATH__ = "/var/**/*.log"`  
I expect to see the local log files.

How do I get the local log files to appear in Grafana?

Should I comment out the “Prometheus” information in the alloy.conf?

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 4:32pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/2 "2025-03-09T16:32:17Z")

</div>

please share your alloy config file.

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 4:50pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/3 "2025-03-09T16:50:32Z")

</div>

Where are the CODE tags? I’m getting a posting error for Loki addresses in the alloy file.  
‘Sorry, New users can only put 2 links per post’

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 5:07pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/4 "2025-03-09T17:07:19Z")

</div>

just replace the loki address with `mickey.mouse`

also why are you scrapping all of this ` __PATH__ = "/var/**/*.log"` instead of just

`/var/log/grafana/*.log`

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:16pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/5 "2025-03-09T17:16:19Z")

</div>

Not possible. I have replaced all of the url’s and it is still giving me an error.  
Maybe the site interprets my commenting out code with `//` as a url.  
I don’t know.

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:18pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/6 "2025-03-09T17:18:23Z")

</div>

#1

```auto
 local.file_match "local_files" {
     path_targets = [{" __path__" = "/var/**/*.log"}]
     sync_period = "5s"
 }

```

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:19pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/7 "2025-03-09T17:19:18Z")

</div>

#2

```auto
loki.source.file "log_scrape" {
    targets = local.file_match.local_files.targets
    forward_to = [loki.process.filter_logs.receiver]
    tail_from_end = true
}

```

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:20pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/8 "2025-03-09T17:20:17Z")

</div>

```auto
loki.write "grafana_loki" {
    endpoint {
      url = "localhost:3100/loki/api/v1/push"

      // basic_auth {
      // username = "admin"
      // password = "admin"
      // }
    }
  }

```

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:21pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/9 "2025-03-09T17:21:21Z")

</div>

#4

```auto
loki.process "filter_logs" {
   stage.drop {
       source = ""
       expression = ".*Connection closed by authenticating user root"
       drop_counter_reason = "noisy"
     }
   forward_to = [loki.write.grafana_loki.receiver]
   }

```

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:24pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/10 "2025-03-09T17:24:08Z")

</div>

#5

```auto
loki.process "filter_logs" {
    stage.drop {
        source = ""
        expression = ".*Connection closed by authenticating user root"
        drop_counter_reason = "noisy"
      }
    forward_to = [loki.write.grafana_loki.receiver]
    }

```

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 5:28pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/11 "2025-03-09T17:28:19Z")

</div>

> [@royalcrown](#):
>
> There is no information showing in the Grafana page.

and now please share the screen where you are querying loki in grafana, maybe go to the datasource of Loki and click explore

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/9/1/91109efe48ae3a7d9428c782ba0afb67ce7f0456.png)

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:33pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/12 "2025-03-09T17:33:48Z")

</div>

![Screenshot 2025-03-09 at 19-33-10 Explore - loki-2 - Grafana](https://us1.discourse-cdn.com/grafana/original/3X/2/9/2984064fc55c291cae953abcbc36c648e34350d8.png)

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 5:34pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/13 "2025-03-09T17:34:33Z")

</div>

well, you need to select something

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/4/a/4a4a895b4474071133f5070c93c5601c5aa08a90.png)

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:38pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/14 "2025-03-09T17:38:00Z")

</div>

I can’t take a screenshot of the drop down box where it says `No Options Found` under `Lable filters`.

`Lable browser`  
`No Lables Found`

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 5:43pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/15 "2025-03-09T17:43:54Z")

</div>

that might means nothing is being scrapped. I would recommend you implement

```auto
loki.echo "debug" { }

```

to see what exactly is happening and keep your eye on the logs Loki is generating to see if there are any issues.

---

<div class="post-metadata">

**Author:** ![royalcrown](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@royalcrown](https://community.grafana.com/u/royalcrown)\
**Post date:** [March 9, 2025, 5:50pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/16 "2025-03-09T17:50:14Z")

</div>

![Screenshot 2025-03-09 at 19-49-30 Grafana Alloy](https://us1.discourse-cdn.com/grafana/original/3X/7/5/75656023d6b68de3064a18d53792229dc6abdccd.png)

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 9, 2025, 5:51pm UTC](https://community.grafana.com/t/local-install-ubuntu-22-04-grafana-has-no-logs/145916/17 "2025-03-09T17:51:24Z")

</div>

that is just health status, it does not tell you if it is scrapping or not.

implement debug and see if anything is being scrapped.
