summaryrefslogtreecommitdiffstats
path: root/src/go/plugin/go.d/modules/proxysql
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/plugin/go.d/modules/proxysql')
-rw-r--r--src/go/plugin/go.d/modules/proxysql/integrations/proxysql.md4
-rw-r--r--src/go/plugin/go.d/modules/proxysql/proxysql.go15
2 files changed, 9 insertions, 10 deletions
diff --git a/src/go/plugin/go.d/modules/proxysql/integrations/proxysql.md b/src/go/plugin/go.d/modules/proxysql/integrations/proxysql.md
index 90d42114..f3a9024b 100644
--- a/src/go/plugin/go.d/modules/proxysql/integrations/proxysql.md
+++ b/src/go/plugin/go.d/modules/proxysql/integrations/proxysql.md
@@ -170,8 +170,8 @@ No action required.
The configuration file name for this integration is `go.d/proxysql.conf`.
-You can edit the configuration file using the `edit-config` script from the
-Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
+You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script from the
+Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
```bash
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
diff --git a/src/go/plugin/go.d/modules/proxysql/proxysql.go b/src/go/plugin/go.d/modules/proxysql/proxysql.go
index fc4677b1..63ed0618 100644
--- a/src/go/plugin/go.d/modules/proxysql/proxysql.go
+++ b/src/go/plugin/go.d/modules/proxysql/proxysql.go
@@ -6,12 +6,13 @@ import (
"database/sql"
_ "embed"
"errors"
- _ "github.com/go-sql-driver/mysql"
"sync"
"time"
"github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
- "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web"
+ "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt"
+
+ _ "github.com/go-sql-driver/mysql"
)
//go:embed "config_schema.json"
@@ -29,7 +30,7 @@ func New() *ProxySQL {
return &ProxySQL{
Config: Config{
DSN: "stats:stats@tcp(127.0.0.1:6032)/",
- Timeout: web.Duration(time.Second),
+ Timeout: confopt.Duration(time.Second),
},
charts: baseCharts.Copy(),
@@ -43,9 +44,9 @@ func New() *ProxySQL {
}
type Config struct {
- UpdateEvery int `yaml:"update_every,omitempty" json:"update_every"`
- DSN string `yaml:"dsn" json:"dsn"`
- Timeout web.Duration `yaml:"timeout,omitempty" json:"timeout"`
+ UpdateEvery int `yaml:"update_every,omitempty" json:"update_every"`
+ DSN string `yaml:"dsn" json:"dsn"`
+ Timeout confopt.Duration `yaml:"timeout,omitempty" json:"timeout"`
}
type ProxySQL struct {
@@ -66,7 +67,6 @@ func (p *ProxySQL) Configuration() any {
func (p *ProxySQL) Init() error {
if p.DSN == "" {
- p.Error("dsn not set")
return errors.New("dsn not set")
}
@@ -78,7 +78,6 @@ func (p *ProxySQL) Init() error {
func (p *ProxySQL) Check() error {
mx, err := p.collect()
if err != nil {
- p.Error(err)
return err
}
if len(mx) == 0 {