Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
93c1020
Modify broken link (#696)
fill-the-fill Aug 3, 2022
b5301de
Update weekly report 08.03 (#724)
fill-the-fill Aug 3, 2022
981f972
Fix broken links and one typo in the Plutus section (#728)
thenic95 Aug 4, 2022
8d279c2
Fixed image for dapps-on-cardano (#729)
nilscodes Aug 5, 2022
90b2eea
Remove outdated projects (#727)
fill-the-fill Aug 6, 2022
1739cbe
Update weekly report 10.03 (#732)
fill-the-fill Aug 11, 2022
53e9238
Add August 2022 Developer Interview with Strica.io (#736)
thenic95 Aug 12, 2022
b00f197
Remove requirement to order alphabetically (#739)
katomm Aug 12, 2022
39ebf36
Update weekly report 17.08 (#741)
fill-the-fill Aug 18, 2022
9e20913
Rework 'Get Started: Cardano Components. (#744)
KtorZ Aug 25, 2022
b1dcd35
Update kes_period.md (#747)
CarlosLopezDeLara Aug 25, 2022
297506e
[Typo] [minting.md] "Amout" -> "Amount" (#743)
sourabhxyz Aug 29, 2022
60fa8c0
Add new filter to check latest showcases and builder tools (#749)
fill-the-fill Aug 30, 2022
2aca5b8
Add cardano-transaction-lib (#750)
klntsky Sep 1, 2022
496a17f
Update Weekly Report 31-08 (#752)
fill-the-fill Sep 1, 2022
a7c27c4
Addition of HeliosLang (#755)
christianschmitz Sep 3, 2022
f9191f7
feat: Add haltscam project (#702)
HT-Moh Sep 6, 2022
bf49d7d
Add a new builder tool tag - PureScript (#753)
fill-the-fill Sep 6, 2022
a863cc0
Revert "Addition of HeliosLang (#755)" (#756)
katomm Sep 6, 2022
b878ce4
Fix displaying unfiltered 10 last projects in showcases (#757)
fill-the-fill Sep 7, 2022
f0e1713
Add Aiken and Pix to Builder Tools (#761)
rvcas Sep 7, 2022
35bfeea
Add NuFi wallet showcase (#758)
fill-the-fill Sep 7, 2022
3f9153f
Update weekly report 07-09 (#763)
fill-the-fill Sep 7, 2022
120d9fb
Addition of HeliosLang with corrected github link (#760)
christianschmitz Sep 8, 2022
68aa4c6
Fix bracket issue in builder tools. (#765)
fill-the-fill Sep 8, 2022
5232f71
Add NFT Gift Card Creator showcase (#754)
minolinpwork Sep 9, 2022
59ce52a
Add Book Token showcase (#725)
fill-the-fill Sep 12, 2022
2763059
Fix cardano-node build instructions on recent MacOS M1 (#769)
KtorZ Sep 12, 2022
71732c9
Update weekly report 09.14 (#773)
fill-the-fill Sep 14, 2022
2d44871
Rework labels & filters on builder-tools (#767)
KtorZ Sep 14, 2022
0b0a067
add voteaire to showcase section (#775)
thenic95 Sep 15, 2022
2705ada
Add Cardano Signer builder tool (#774)
fill-the-fill Sep 16, 2022
d06efac
cardano-signer: replace narrative thumbnail with logo (#777)
rphair Sep 17, 2022
840dd6c
Add StakePool Operator Scripts builder tool (#779)
rphair Sep 17, 2022
dcbe70a
Add Github Changelog (#776)
fill-the-fill Sep 18, 2022
3a6b486
Modify maximum changelog users list from 10 to 20 before unfold optio…
fill-the-fill Sep 19, 2022
f000b5f
Various open graph images (#788)
katomm Sep 21, 2022
eb8916d
Fix dates and weeks in Changelog (#790)
fill-the-fill Sep 22, 2022
142b487
Open graph images patch (#795)
katomm Sep 23, 2022
da52240
Add September 2022 Developer Interview with ADAO (#794)
thenic95 Sep 26, 2022
da2b543
add why contribute section (#793)
weqanhet Sep 26, 2022
590a79e
Remove weekly report markdown file (#789)
fill-the-fill Sep 26, 2022
5d952c7
Update project structure documentation (#785)
fill-the-fill Sep 26, 2022
21af65c
Update hydra links for node binaries (#799)
zliu41 Sep 26, 2022
1cdc5e3
Updated script for getting pool statistic (#798)
os11k Sep 26, 2022
cad0e0f
added Loxe to careers page (#796)
manonthemat Sep 26, 2022
7d2b0af
Add "known problems"-section to "how to contribute?" (#792)
katomm Sep 27, 2022
c2a23cf
removed adaex and adapools from Showcase (#800)
rphair Sep 28, 2022
6efc202
Add cexplorer (#745)
cexplorer Sep 28, 2022
b61fa95
Add Discord and Developer Ecosystem into footer (#804)
fill-the-fill Sep 30, 2022
6134170
Update Changelog (End of September) (#803)
fill-the-fill Oct 2, 2022
155fe1b
Current Staging Build is broken, remove API tag from Cexplorer to fix…
fill-the-fill Oct 4, 2022
5823e11
Add Mesh into builder tools and showcases (#784)
jinglescode Oct 5, 2022
12273df
Adding a link to Plutus resources on Cardano Docs (#809)
olgahryniuk Oct 5, 2022
9a8c73a
Adding Cardano Leader Slot (#807)
QuixoteSystems Oct 5, 2022
30d8b29
Add Frankenwallet builder tool (#808)
rphair Oct 7, 2022
77bcb80
Add Connect with wallet builder tool (#816)
fill-the-fill Oct 7, 2022
9020630
Add Project Catalyst Fund 9 Voting Results (#813)
fill-the-fill Oct 7, 2022
902d1a9
add open graph image for adao blog (#801)
thenic95 Oct 11, 2022
f76fc19
Fix tutorial links in plutus.md (#819)
ch1bo Oct 12, 2022
f8af290
Update testnet files + outcome from cli query tip (#814)
williamalvarezdev Oct 12, 2022
037152f
Add cnft (npm lib) builder tool (#817)
Jack-0 Oct 12, 2022
cac2ac8
Add Open Graph image for Showcase and Builder Tools section (#821)
fill-the-fill Oct 12, 2022
5b902e0
Add Bakrypt.io builder tool (#820)
Wolfy18 Oct 12, 2022
52acffa
I was missing openssl (#791)
pgrange Oct 12, 2022
f4691f3
Add CARP builder tool (#822)
fill-the-fill Oct 13, 2022
ff213c8
Add Pooldata.live builder tool (#824)
fill-the-fill Oct 13, 2022
7f73a7c
Add amount of PRs in Changelog (#823)
fill-the-fill Oct 13, 2022
c0b9bde
Add Plutip builder tool (#783)
mikekeke Oct 17, 2022
ca807b2
Add Carda Station to showcase (#830)
cardadev Oct 18, 2022
a123141
corrected + clarified link to NFT Support showcase (#828)
rphair Oct 19, 2022
177708d
Add yarn github action (#832)
oversize Oct 20, 2022
dbf6d10
Add Koios Python builder tool (#806)
QuixoteSystems Oct 21, 2022
c2180e1
Remove un-reusable functions from reusable.ts script file (#834)
fill-the-fill Oct 26, 2022
dc09797
Updating Cardano-Signer website url (#840)
gitmachtl Oct 26, 2022
50d76bd
Add Demeter.run builder tool (#838)
fill-the-fill Oct 27, 2022
4171c26
Add more technical concepts by Andrew Westberg (#843)
fill-the-fill Oct 31, 2022
9bfa71d
link transparently to operations book Environments page (#846)
rphair Nov 1, 2022
4a8c84c
Update Changelog (End of October) (#847)
fill-the-fill Nov 2, 2022
7651df0
Add Changelog link into Contribute section (#844)
fill-the-fill Nov 3, 2022
034ba78
Add multiple PR templates (#845)
fill-the-fill Nov 3, 2022
81ec3cb
Add STAMPD showcase (#841)
fill-the-fill Nov 3, 2022
facb2e2
Fix displaying missing CIPs (#848)
fill-the-fill Nov 3, 2022
1eadbb3
Modify image for Cardano connect with wallet builder tool (#842)
fill-the-fill Nov 3, 2022
cd78420
chore: add vercel deploys (#855)
cf-web3-team-integrations Nov 9, 2022
c9e5616
Replace Changelog title and remove copyright (#851)
fill-the-fill Nov 10, 2022
67501d6
fix(gh-actions): revert vercel deployments (#857)
cf-web3-team-integrations Nov 10, 2022
4dc879c
Fix preprod typo (#858)
fabianbormann Nov 11, 2022
9969ff7
Added Grafana Loki page (#859)
os11k Nov 11, 2022
28f697a
Update tesnet faucet link (#850)
EKivutha Nov 11, 2022
8874114
Add Kogmios builder-tool (#860)
AndrewWestberg Nov 13, 2022
bacdfef
Replace outdated website link (#854)
fill-the-fill Nov 15, 2022
2909e98
Add TapTools showcase (#782)
fill-the-fill Nov 17, 2022
f870325
Added User wallet authentication to docs (#863)
inimrod Nov 28, 2022
647d632
Add Shareslake to showcase (#867)
miguelaeh Nov 29, 2022
262fe77
Add Lending Pond showcase and a new Lending tag (#730)
fill-the-fill Dec 1, 2022
8c22c10
Add NFT Creator showcase (#766)
minolinpwork Dec 1, 2022
52d5cda
Add CNFTLab party showcase (#839)
fill-the-fill Dec 1, 2022
e1e79c6
Bump loader-utils from 2.0.3 to 2.0.4 (#862)
dependabot[bot] Dec 1, 2022
36a5ea4
Add changelog data for November 2022 (#869)
fill-the-fill Dec 1, 2022
e6c2c01
Add nmkr studio in builder tools (#865)
schaier-io Dec 3, 2022
74ed40c
Remove showcase Paradiso (#874)
aarondunnington Dec 6, 2022
e01d837
replaced HydraBuildList with static but valid links (#873)
rphair Dec 6, 2022
b234c29
Added links for latest Marlowe development documentation. (#872)
bwbush Dec 6, 2022
5be4da3
Add more technical concepts by Andrew Westberg (#878)
fill-the-fill Dec 9, 2022
3da9bae
Add Bridge filter into showcases (#880)
fill-the-fill Dec 11, 2022
33df8f7
Fix some typos in minting.md (#882)
AntonEriksson978 Dec 14, 2022
1b4f0bc
Update Docusaurus to 2.2.0 (#883)
fill-the-fill Dec 14, 2022
4e8250a
Skip creating an empty policy script (#885)
eyeinsky Dec 14, 2022
7a27df2
Add Chainport to Showcase (#875)
eserilev Dec 19, 2022
5dd7319
Add Cardano Verify Datasignature builder tool (#890)
fill-the-fill Dec 21, 2022
7325186
Added "Pet Registry" project to showcase (#893)
fangio10 Dec 21, 2022
17a3897
Add Koios Api Python package project to builder tools (#896)
cardano-apexpool Dec 22, 2022
26e1a1c
Minor improvement of the native tokens docs (#900)
tomveich Dec 27, 2022
b62523a
Add Koios tag to Builder Tools (#898)
rphair Dec 27, 2022
f034ab2
gitignore yarn.lock but leave in repo, gitignore + remove .yarn (#901)
rphair Dec 30, 2022
f779558
Add gimbalabs developer spotlight interview for January 2023 (#909)
thenic95 Jan 3, 2023
15b1be7
Update Contributor instructions for yarn.lock (#906)
rphair Jan 3, 2023
d3377ce
Add Tokhun.io minting tag in Showcase (#908)
rphair Jan 3, 2023
4f15dfa
Add Milkomeda to Showcase (#899)
rphair Jan 3, 2023
096f8ff
Add Cardano Token Registry Python API to Builder Tools (#897)
cardano-apexpool Jan 3, 2023
cba0fba
Add more technical concepts by Andrew Westberg (#913)
fill-the-fill Jan 6, 2023
108f8f8
Update changelog for Decemeber and fix small error in previous month …
fill-the-fill Jan 6, 2023
ead5733
add Mesh documentation in Get Started (#916)
jinglescode Jan 7, 2023
526b30b
Bump json5 from 2.2.1 to 2.2.3 (#919)
dependabot[bot] Jan 10, 2023
1fe0bd3
Replace plutus-playground with demeter.run (#910)
OlofBlomqvist Jan 12, 2023
a742046
edit Security Best Practices for spelling, grammar, formatting, clari…
rphair Jan 15, 2023
71e34fa
fix expired Discord invite for CIPs server (#922)
rphair Jan 15, 2023
59b1712
Add eopsin as Smart Contract language (#929)
nielstron Jan 17, 2023
24966e4
Add eopsin to builder tools (#928)
nielstron Jan 17, 2023
0a091d1
Add Aiken as smart contract language (#926)
OlofBlomqvist Jan 17, 2023
c6592fa
Fix typo in stake pool course (#931)
dschrempf Jan 18, 2023
ad5181d
Stake Pool Course introduction: grammar, usage, formatting (#930)
dschrempf Jan 18, 2023
c7bf6f1
Add Periodic DNS Resolver to builder tools (#925)
Fuma419 Jan 18, 2023
5982731
Add new Project Catalyst Website and update texts (#933)
thenic95 Jan 20, 2023
bd935ca
Add Raw Cardano showcase (#932)
fill-the-fill Jan 20, 2023
8b0f891
Add showcase Cardano Relay Map (#935)
fill-the-fill Jan 25, 2023
e6e5f0e
Add showcase NFTada.io (#934)
fill-the-fill Jan 25, 2023
f90860a
Add Koios + Ogmios Java Clients to Builder Tools (#936)
edridudi Jan 26, 2023
40cd854
Fix: typos (#937)
omahs Jan 27, 2023
bfae2d4
Add BALANCE to Showcase (#946)
Balance-Analytics Feb 6, 2023
41c8816
Add changelog for January 2023 (#947)
fill-the-fill Feb 7, 2023
024e06c
Add Finitum Bridge to showcase (#942)
inimrod Feb 7, 2023
abd998b
Remove 'Edit this page' button from autogenerated content pages (#950)
fill-the-fill Feb 8, 2023
2da8c69
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#943)
dependabot[bot] Feb 8, 2023
3a192eb
Replace 'Committers' in changelog with 'Contributors' (#951)
fill-the-fill Feb 9, 2023
660d286
Add proper Aiken get-started page and other improvements (#955)
katomm Feb 9, 2023
6abd99e
Add peerreview.money to Showcase (#949)
thisisjago Feb 10, 2023
5b091d0
Bump ua-parser-js from 0.7.32 to 0.7.33 (#938)
dependabot[bot] Feb 10, 2023
ad008ff
Update Docusaurus to 2.3.1 (#956)
fill-the-fill Feb 12, 2023
8d3fc63
Add Aiken's acca to builder tools (#958)
matiwinnetou Feb 13, 2023
c86b03d
Bump @sideway/formula from 3.0.0 to 3.0.1 (#954)
dependabot[bot] Feb 13, 2023
af79884
Fixed M1 installation (#957)
os11k Feb 13, 2023
e467873
Add @dotare/cardano-delegation to Builder Tools (#953)
DorienP Feb 14, 2023
628b103
added Aiken category to Builder Tools (#960)
rphair Feb 14, 2023
a357c46
New monthly addition (February 2023) to the Developer Blog - NEWM Int…
thenic95 Feb 17, 2023
ceda834
Add Cardano Studio to Showcases (#907)
bugii Feb 17, 2023
d54a70a
fix broken links (#967)
gufmar Feb 20, 2023
479704c
Add technical concepts for January 2023 (#948)
fill-the-fill Feb 21, 2023
2999f11
Update Mesh docs (#974)
jinglescode Feb 27, 2023
82e071f
Updating Plutus pioneer program section (#972)
LukaKurnjek Feb 27, 2023
eb7e5dd
Update the NEWM blog to the newest version (#969)
thenic95 Feb 27, 2023
4877132
Updating links and text for the Plutus page. (#962)
LukaKurnjek Feb 27, 2023
364f4aa
Add Changelog for February (#975)
fill-the-fill Mar 1, 2023
02a63c0
Installing cardano-node: update links to binaries (#978)
WesleyBatista Mar 6, 2023
7cbf615
Update minting-nfts.md (#980)
36thchambersoftware Mar 7, 2023
570da11
Modify testnet and devnets page (#963)
fill-the-fill Mar 7, 2023
7d5f361
Add more technical concepts by Andrew Westberg (#982)
fill-the-fill Mar 8, 2023
b06d573
Remove Loxe from careers list (#981)
fill-the-fill Mar 8, 2023
731e4db
Add DCOne Webhook API to Builder Tools (#977)
DCOneCrypto Mar 14, 2023
86c1a09
Update installing-cardano-node.md (#979)
os11k Mar 14, 2023
b60e387
Modify spelling and add more clear description on testnet page (#983)
fill-the-fill Mar 15, 2023
5b52f43
Add Crystal libraries (#984)
wout Mar 15, 2023
3391bd1
Bump webpack from 5.75.0 to 5.76.1 (#987)
dependabot[bot] Mar 15, 2023
6f3be40
Rename eopsin to opshin (#989)
nielstron Mar 19, 2023
7e728cc
Modify regex in CIP name fetching (#992)
fill-the-fill Mar 20, 2023
4c6a782
new developer spotlight blog for March 2023. Interview with Jingles, …
thenic95 Mar 21, 2023
03b9daa
Modify NFT minting course with addition of network selection (#993)
fill-the-fill Mar 22, 2023
aab6fea
Modify CIP, Rust Library and Token Registry script constant namings. …
fill-the-fill Mar 22, 2023
d7baea0
Correct grammar and spelling for Mainnet and testnets (staging) (#991)
rphair Mar 23, 2023
d3e7444
Update Showcase item Haltscam, including rename to Profiler (#997)
HT-Moh Mar 23, 2023
74c6090
Tag Cardano Client Library as favorite (#1004)
matiwinnetou Mar 25, 2023
31edb11
add Real World Marlowe to Marlowe page (#990)
rphair Mar 25, 2023
55b005b
Add Lace to showcase (#985)
olgahryniuk Mar 27, 2023
a24d660
Add blurb about Plutus PBL course (#1009)
workshop-maybe Mar 29, 2023
9f95b29
Revert "Add Lace to showcase (#985)" (#1007)
fill-the-fill Mar 29, 2023
88d9c4b
Update installing-cardano-node with minor fixes (#1008)
os11k Mar 29, 2023
6bbe09d
Update acca project image (#1003)
matiwinnetou Apr 4, 2023
8dd02f1
NFT Update Proposal (#1012)
katomm Apr 4, 2023
7b8328d
Add changelog for March (#1014)
fill-the-fill Apr 4, 2023
1eb5dbc
Update Docusaurus to 2.4 (#1013)
fill-the-fill Apr 5, 2023
d8b61ab
Move guidelines for builder tools and showcase into docs (#1017)
katomm Apr 10, 2023
9dc2d8f
Add Lace to showcase (#1021)
olgahryniuk Apr 12, 2023
b0d276c
Update Lace description (#1024)
olgahryniuk Apr 13, 2023
3c41967
Update installing-cardano-node.md to ver 1.35.7 (#1025)
gufmar Apr 14, 2023
efbe385
Add plu-ts to Builder Tools + Smart Contract platforms (#1027)
michele-nuzzi Apr 23, 2023
61fc802
Update and extend the example section for OpShin (#1030)
nielstron Apr 23, 2023
782817d
Add Receiving Payments (POS + Blockfrost API) tutorial (#1031)
fill-the-fill Apr 24, 2023
6e9ede2
POS tutorial - change 'clone' to 'fork' typo (#1032)
fill-the-fill Apr 24, 2023
f08a662
Fix OG image for catalyst page (#1034)
fill-the-fill Apr 25, 2023
fec6786
Fix OG image path on all markdown files, including fetched data on bu…
fill-the-fill Apr 25, 2023
fa4515b
Fix mobile jump bug when using search bar (#1039)
fill-the-fill Apr 25, 2023
8b876f6
Receiving Payments (Blockfrost API) - Minor Documentation fix (#1036)
fill-the-fill Apr 26, 2023
53d75fe
Resolve unique key issue in showcase and builder tools page; fix svg …
fill-the-fill Apr 26, 2023
cd31d51
Add aada.finance to Showcase (#1040)
fill-the-fill Apr 26, 2023
cee4df0
Add flipr.io to Showcase (#1042)
fill-the-fill Apr 28, 2023
f60ff16
update: blockfrost (#1048)
mmahut May 3, 2023
6cc1511
Merge remote-tracking branch 'revamp-stake-pool-course/revamp-stake-p…
May 5, 2023
47fb9ca
Merge stake pool course branch up to date with some adjustments
May 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added Grafana Loki page (#859)
* Added tutorial for Grafana Loki - fixes #616

* Added tutorial for Grafana Loki(images and main doc in this commit)  - fixes #616
  • Loading branch information
os11k authored Nov 11, 2022
commit 9969ff7b68884c707d38c5cb3ba14c81715607b7
295 changes: 295 additions & 0 deletions docs/stake-pool-course/handbook/grafana-loki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
---
id: grafana-loki
title: Grafana Loki Tutorial
sidebar_label: Grafana Loki Tutorial
description: "Stake pool course: Grafana Loki Tutorial"
image: ../img/og/og-developer-portal.png
---
As far as some of us here are running several cardano nodes, at some point it might happen that we might need to go through some cardano node logs, maybe it is relay what misbehaves or maybe you missed a block and now you need to find out what happened. I personally used to go through logs with tail, grep and etc. That doesn’t seems very productive way. How you can filter all logs from all nodes for 12:00-12:05 UTC 5th of May for example? You can of course grep it on several machines and then piece them together, but what if you can have a central location were all logs are stored and you can search through all logs from all nodes simultaneously or on particular box only or on several particular boxes and even create alerts based on particular log entry using regexp and etc.

So here I would like to explain how I personally build centralized log solutions for all my cardano-nodes. I used for that grafana loki, what will receive logs and then you can see them in grafana. As far as grafana is widely used by SPOs, I think it a reasonable choice, you don’t need to add much to your existing infrastructure.

## 1. Loki installation

I personally installed Grafana & prometheus some time ago using docker-compose, so to install Loki I just needed to update docker-compose file accordingly.

Grafana-prometheus-loki docker-compose files what I personally use for Grafana, Loki and Prometheus can be found here:

[docker-compose files](https://github.com/os11k/grafana-loki-prometheus)

If you are starting without existing grafana, or you want to use docker now, you can just run 5 following commands(assuming we are using debian based Linux distro) and you will have new and shiny grafana, prometheus and loki running in docker:

```shell
apt-get update && apt-get upgrade -y && apt-get install docker-compose -y
mkdir /docker && cd /docker
git clone https://github.com/os11k/grafana-loki-prometheus.git
cd ./grafana-with-prometheus/
docker-compose up -d --build
```

Don’t forget to update accordingly to your setup `./etc-prometheus/prometheus.yml`.

If you are here just for Loki, you need to update docker-compose.yml and comment out all parts related to grafana & prometheus:

```shell
version: "3.5"

services:
# grafana:
# container_name: grafana
# network_mode: "host"
# image: grafana/grafana:latest
# restart: always
# volumes:
# - grafana_data:/var/lib/grafana
# logging:
# driver: "json-file"
# options:
# max-size: "200k"
# max-file: "10"
# prometheus:
# container_name: prometheus
# network_mode: "host"
# image: prom/prometheus:latest
# restart: always
# volumes:
# - ./etc-prometheus:/etc/prometheus
# - prometheus_data:/prometheus
# logging:
# driver: "json-file"
# options:
# max-size: "200k"
# max-file: "10"
loki:
container_name: loki
network_mode: "host"
image: grafana/loki:latest
restart: always
volumes:
- ./etc-loki:/etc/loki
- loki_data:/loki
command: -config.file=/etc/loki/loki-config.yml
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
# prometheus_data: {}
# grafana_data: {}
loki_data: {}
```

There are some other ways to install Loki, but I personally would avoid that:

[Installing Loki on Ubuntu 20.04](https://lindevs.com/install-loki-on-ubuntu/)

## 2. Installing and configuring agent for pushing logs to Loki

When Loki installed, you need to configure your nodes to push logs to Loki. In case if your cardano nodes are running in docker, you just need to install docker module and restart docker engine

```shell
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
systemctl restart docker
```

you can verify that everything is fine:

```shell
docker plugin ls
```

And you should see your newly installed plugin for docker:

```shell
ID NAME DESCRIPTION ENABLED
b20ef946c02f loki:latest Loki Logging Driver true
```

Then you can either to configure each container separately, for example I just added those lines in my docker-compose(don’t forget to put your Loki IP instead of loki-ip):

```shell
logging:
driver: loki
options:
loki-url: http://loki-ip:3100/loki/api/v1/push
max-size: 50m
```

Or you can configure it once for all containers by creating `/etc/docker/daemon.json` file(again do not forget to change loki-ip to IP address of your Loki box):

```shell
{
"debug" : true,
"log-driver": "loki",
"log-opts": {
"loki-url": "https://loki-ip/loki/api/v1/push",
"max-size": "50m"
}
}
```

If you created or edited `daemon.json`, then you will need to restart docker service:

```shell
systemctl restart docker
```


:::note

max-size setting seems weird, but you need to have it, otherwise loki docker plugin will fill out all the space.

:::


Keep in mind that containers must be recreated so they can start sending logs to Loki. As far as I utilize docker-compose, that what worked for me:

```shell
docker-compose down
docker-compose up -d --build
```

More details:

[Configuring the Docker Driver](https://grafana.com/docs/loki/latest/clients/docker-driver/configuration/)

[Collecting Docker Logs With Loki](https://yuriktech.com/2020/03/21/Collecting-Docker-Logs-With-Loki/)

If you are running your nodes not in docker then you will need to install promtail - a client which will push logs to Loki:

[Install Promtail on Ubuntu 20.04](https://lindevs.com/install-promtail-on-ubuntu/)

You will need to configure promtail too, here is simple config file, what should work(never tried, though):

```shell
server:
http_listen_port: 0
grpc_listen_port: 0

positions:
filename: /tmp/positions.yaml

client:
url: http://localhost:3100/api/prom/push

scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log
```

Keep in mind that you must put correct Loki IP, in above example it is localhost, additionally you need to change directory where cardano-node logs are stored, in example above it is `/var/log`, so if your cardano node logs goes in different directory, you need to update it.

[Config file was taken from here](https://github.com/rongfengliang/grafana-loki-demo/blob/master/promtail-local-config.yaml)

Loki do not pull logs, but rather promtail or docker engine are pushing logs to Loki. So if you are using default 9100 port for Loki, then from clients(cardano nodes in our case) you should be able to access Loki on 9100 port. You can check that with telnet command from cardano nodes:

```shell
telnet loki-ip 9100
```

In case of successful connection you should see something like that:

```shell
Connected to loki-ip.
Escape character is '^]'.
```

## 3. Configuring Loki datasource in Grafana

When Loki is installed and Loki client is configured(docker driver or promtail) you should add Loki as source to Grafana, it is same process as you did for prometheus:

Configuration => Datasources:

![Datasource](/img/stake-pool-course/loki-grafana-datasource.png)

Press add data source and then select Loki from list:

![Datasource](/img/stake-pool-course/loki-grafana-select-loki.png)

You will see following screen:

![Datasource](/img/stake-pool-course/loki-grafana-data-source-loki.png)

If you are running Loki on same box as Grafana or in docker as I described above, you will need just to put localhost in URL, as it proposes:

![Datasource](/img/stake-pool-course/loki-grafana-configure-ip.png)

If you run Loki on different server, then those link should be updated accordingly.

## 4. Setting up Loki dashboards

Now we are ready to browse Loki data in grafana. Go to explore:

![Datasource](/img/stake-pool-course/loki-explore-loki.png)

Select Loki:

![Datasource](/img/stake-pool-course/loki-select-loki.png)

There you should be able to see different labels. In my case it is compose_projects and others, compose_projects are my docker container names, with promtail it can be configured inside config file I believe, but in any case you must have something there.

![Datasource](/img/stake-pool-course/loki-explore-labels.png)

If we select specific label in our case compose_project => test-relay1

![Datasource](/img/stake-pool-course/loki-test-relay1-explore.png)

If we press show logs, you should be able to see all logs from that box:

![Datasource](/img/stake-pool-course/loki-show-logs.png)

This is how you can access all your logs in “explore” menu, if you like you can add that screen of logs to dashboard, if you press “add to dashboard” button on right top corner:

![Datasource](/img/stake-pool-course/loki-add-dashboard.png)

I personally created one dashboard with 4 panels with logs from all my nodes, as shown here:

![Datasource](/img/stake-pool-course/loki-4-panels.png)

To search in all logs simultaneously you can do it via “explore” or you can add following dashboard to your grafana:

[Dashboard](https://gist.github.com/os11k/ffcc2a41862a8c35db7a30fd7f13ef09)

Keep in mind in my example dashboard cardano nodes has label named “compose_project”, so if your nodes has different labels inside loki just substitute in above file word “compose_project” with correct one. Your labels you can find in “explore” of grafana like here:

![Datasource](/img/stake-pool-course/loki-labels.png)

At the end you should be able to have following dashboard:

![Datasource](/img/stake-pool-course/loki-final-dashboard.png)

In “compose_project” you can select nodes where you can search for logs and String match field is what you are looking for. For example I have p2p on my test pool, let search on relays, when peer status changed from Hot to Cold:

![Datasource](/img/stake-pool-course/loki-hot2cold.png)

So that seems pretty nice working and no need to go login via SSH to your nodes and go through logs.

:::note

I would like to add that currently latest(8.5+ and 9+) versions of Grafana has very nice alerting out of the box, so called unified alerting. So if any of you are using some old Grafana versions, it is worth to consider to move to new version and maybe even a docker based Grafana, what will allow you to send alerts to telegram, slack and etc, without need alert manager and if you will choice docker then updates of Grafana will become much easier.

:::

## Recommended resources:

[How To Forward Logs to Grafana Loki using Promtail](https://computingforgeeks.com/forward-logs-to-grafana-loki-using-promtail/)

[Loki Installation](https://grafana.com/docs/loki/latest/installation/)

[Loki installation in Ubuntu](https://levelup.gitconnected.com/loki-installation-in-ubuntu-2eb8407de291)

<iframe width="100%" height="325" src="https://www.youtube.com/embed/VEGYgPiAazk" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/><br/>

<iframe width="100%" height="325" src="https://www.youtube.com/embed/BvgLIsWNV-0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/><br/>

<iframe width="100%" height="325" src="https://www.youtube.com/embed/UtmmhLraSnE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/><br/>
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ module.exports = {
label: "Handbook",
items: [
"stake-pool-course/handbook/grafana-dashboard-tutorial",
"stake-pool-course/handbook/grafana-loki",
"stake-pool-course/handbook/setup-virtual-box-written",
"stake-pool-course/handbook/setup-a-server-on-aws-written",
"stake-pool-course/handbook/setup-firewall",
Expand Down
Binary file added static/img/stake-pool-course/loki-4-panels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/stake-pool-course/loki-hot2cold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/stake-pool-course/loki-labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/stake-pool-course/loki-select-loki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/stake-pool-course/loki-show-logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.