blob: f2e6bee37f49afe6a1e822809a326be495af10c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// SPDX-License-Identifier: GPL-3.0-or-later
package openvpn_status_log
import (
"errors"
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher"
)
func (o *OpenVPNStatusLog) validateConfig() error {
if o.LogPath == "" {
return errors.New("empty 'log_path'")
}
return nil
}
func (o *OpenVPNStatusLog) initPerUserStatsMatcher() (matcher.Matcher, error) {
if o.PerUserStats.Empty() {
return nil, nil
}
m, err := o.PerUserStats.Parse()
if err != nil {
return nil, err
}
return m, nil
}
|