Skip to content

Custom plugin syntax #3

Description

@N-e-m-o

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"
},]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions