Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inputs.swap]: Error in plugin: error getting swap memory info: xswdev version mismatch #5395

Closed
nbari opened this issue Feb 8, 2019 · 7 comments · Fixed by #5552
Closed
Labels
bug unexpected problem or unintended behavior platform/bsd upstream bug or issues that rely on dependency fixes
Milestone

Comments

@nbari
Copy link

nbari commented Feb 8, 2019

Relevant telegraf.conf:

[[inputs.swap]]

System info:

Telegraf 1.9.3
FreeBSD 12.0-STABLE r343881 amd64

Steps to reproduce:

use swap on ZFS only:

zfs create -V 64G -o org.freebsd:swap=on -o checksum=off -o compression=off -o dedup=off -o sync=disabled -o primarycache=none tank/swap

Output of swapinfo:

# swapinfo -h
Device          1K-blocks     Used    Avail Capacity
/dev/zvol/tank/swap  67108864       0B      64G     0%

Expected behavior:

Get metrics/status from swap

Actual behavior:

E! [inputs.swap]: Error in plugin: error getting swap memory info: xswdev version mismatch

Additional info:

[Include gist of relevant config, logs, etc.]

@danielnelson
Copy link
Contributor

Would it be possible to run this Go program? Place the following code in a file main.go:

package main

import (
	"fmt"

	"github.com/shirou/gopsutil/mem"
)

func main() {
	res, err := mem.SwapMemory()
	if err != nil {
		fmt.Println(err)
		return
	} else {
		fmt.Println(res)
	}
}

To run it you will need Go 1.9 or later:

go get -d github.com/shirou/gopsutil/mem # downloads to ~/go
go run main.go

Can you also run freebsd-version -k -r -u and uname -a?

@danielnelson danielnelson added bug unexpected problem or unintended behavior platform/bsd labels Feb 8, 2019
@nbari
Copy link
Author

nbari commented Feb 8, 2019

Hi @danielnelson, this is the output of the code:

xswdev version mismatch

The out put of freebsd-version -k -r -u:

> freebsd-version -k -r -u
12.0-STABLE
12.0-STABLE
12.0-STABLE

and uname -a:

FreeBSD dev 12.0-STABLE FreeBSD 12.0-STABLE r343685 DL360  amd64

@danielnelson
Copy link
Contributor

I opened an issue with gopsutil, if you could subscribe to that issue I'm sure there will be some follow up questions.

@nbari
Copy link
Author

nbari commented Mar 7, 2019

Is this fixed in latest version 1.10.0 ?

@danielnelson
Copy link
Contributor

Unfortunately no, we need to update gopsutil to v2.19.02. We don't normally update gopsutil on patch releases unless something major comes up, because it often causes other issues, so this will likely need to wait for 1.11. I will update master now though, are you using our official packages?

@nbari
Copy link
Author

nbari commented Mar 7, 2019

I use the port: https://www.freshports.org/net-mgmt/telegraf/

@danielnelson danielnelson added this to the 1.11.0 milestone Mar 7, 2019
@danielnelson
Copy link
Contributor

cc @girgen @W0CHP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior platform/bsd upstream bug or issues that rely on dependency fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants