Skip to content

Commit c01694c

Browse files
BarbatosBarbatos
authored andcommitted
add alloy readme
1 parent 265b054 commit c01694c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

metric_monitor/REMOTE_WRITE_WITH_THANOS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ remote_write:
128128
- Other storage flags can be found in the [official documentation](https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects). For a quick start, you could use the default values.
129129

130130
#### Alternative way to set up Prometheus and Node Exporter
131-
Grafana Alloy can be used to set up Prometheus and Node Exporter.
131+
Grafana Alloy provides a unified solution that consolidates the functionalities of Prometheus and Node Exporter into a single service. As an all-in-one monitoring agent, it not only handles metrics collection and exportation but also includes built-in log aggregation capabilities, eliminating the need for separate monitoring components.
132132
##### Alloy configuration file
133133
Please refer to the [prometheus-loki.alloy](./conf/prometheus-loki.alloy) for the Alloy configuration file. You will need to update certain values to match your environment, such as `prometheus.scrape.targets`, `discovery.relabel`.
134134

tools/trond/cmd/snapshot/download.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package snapshot
33
import (
44
"errors"
55
"fmt"
6-
"github.com/tronprotocol/tron-docker/config"
76
"log"
87
"os"
98
"strings"
109

10+
"github.com/tronprotocol/tron-docker/config"
11+
1112
"github.com/MakeNowJust/heredoc/v2"
1213
"github.com/spf13/cobra"
1314
"github.com/tronprotocol/tron-docker/utils"
@@ -120,12 +121,12 @@ func download(domain string, backup string, nType string) {
120121

121122
if folderYes, _ := utils.PathExists(networkDst); !folderYes {
122123
fmt.Println("Creating directory:", networkDst)
123-
if err := utils.CreateDir(networkDst, true); err != nil {
124+
if err = utils.CreateDir(networkDst, true); err != nil {
124125
fmt.Println(" - Error creating directory:", err)
125126
return
126127
}
127128
} else if databaseYes, _ := utils.PathExists(databaseDst); databaseYes {
128-
fmt.Println(fmt.Sprintf("Notice: there already exist database data %s, please delete it if you want to download again.", databaseDst))
129+
fmt.Printf("Notice: there already exist database data %s, please delete it if you want to download again.\n", databaseDst)
129130
return
130131
}
131132

@@ -135,15 +136,15 @@ func download(domain string, backup string, nType string) {
135136
return
136137
}
137138

138-
if err := utils.ExtractTgzWithStatus(downloadSnapshot, "./"); err != nil {
139+
if err = utils.ExtractTgzWithStatus(downloadSnapshot, "./"); err != nil {
139140
fmt.Println("Error:", err)
140141
return
141142
}
142143

143144
/* At least according to the domain, move extracted database to the correct subtype directory.
144145
The database will be used by `./trond node run-single`, check that part for details
145146
*/
146-
fmt.Println(fmt.Sprintf("Finally move the database to the corresponding network folder %s", databaseDst))
147+
fmt.Printf("Finally move the database to the corresponding network folder %s\n", databaseDst)
147148
srcDatabase := "./output-directory/database"
148149

149150
// Check whether dst directory already exist, if yes, return warning let user decide whether to continue downloading.

0 commit comments

Comments
 (0)