This commit is contained in:
parent
ce507e522f
commit
ee5827ccbd
|
@ -36,6 +36,8 @@ The sample config file
|
|||
# dump_zeros = true
|
||||
```
|
||||
|
||||
In case that `proc_net_snmp6` path doesn't exist (e.g. IPv6 is not enabled) no error would be raised.
|
||||
|
||||
### Measurements & Fields
|
||||
|
||||
- nstat
|
||||
|
|
|
@ -83,13 +83,14 @@ func (ns *Nstat) Gather(acc telegraf.Accumulator) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// collect SNMP6 data
|
||||
// collect SNMP6 data, if SNMP6 directory exists (IPv6 enabled)
|
||||
snmp6, err := ioutil.ReadFile(ns.ProcNetSNMP6)
|
||||
if err == nil {
|
||||
err = ns.gatherSNMP6(snmp6, acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = ns.gatherSNMP6(snmp6, acc)
|
||||
if err != nil {
|
||||
} else if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue