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

Custom plugin syntax #3

Open
N-e-m-o opened this issue Mar 2, 2017 · 0 comments
Open

Custom plugin syntax #3

N-e-m-o opened this issue Mar 2, 2017 · 0 comments

Comments

@N-e-m-o
Copy link

N-e-m-o commented Mar 2, 2017

The documentation on writing a custom plugin specifies the following:

Add the command that can execute this file in /etc/opt/amonagent/plugins-enabled/custom.conf

[{ "command":"python /path/to/your-metrics.py", "name":"requests"},]

After testing my custom plugin I kept getting the issue error:

ERRO[0000] Can't decode JSON file                        error="invalid character ']' looking for beginning of value" plugin=custom 
{}

This appears to be a formatting issue on the Wiki, since formatting the command as below solves this issue:

[{ 
"command":"python /path/to/your-metrics.py", 
"name":"requests"
},]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant