This is a server for EC2 Filter JSON API for Grafana JSON Data Source. Requests can look similar to the Filter API of EC2.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Darshil Chanpura 7f78dff56d Added images again 12 months ago
awsr Code pushed 12 months ago
cmd/sieve-server Changed path 12 months ago
docs/images Changed path 12 months ago
server Changed path 12 months ago
.gitignore Changed path 12 months ago
README.md Added images again 12 months ago
go.mod Changed path 12 months ago
go.sum Initial Commit 12 months ago

README.md

Sieve Server

This starts a server for EC2 Filter JSON API for Grafana JSON Data Source. Requests can look similar to the Filter API of EC2

Usage

Command

❯ sieve-server -h
Usage of sieve-server:
  -addr string
        Address to listen to (default ":8001")
  -aws-max-results int
        Max Results to fetch per call (default 100)
  -aws-profile string
        Profile to use for AWS
  -aws-region string
        AWS Region to use

Grafana

Steps to add and configure the Data source with this API

  • Go to Configuration > Data Sources > Add data source
  • Search for json and select SimpleJson
  • Enter the name of choice, e.g. EC2 Filter API
  • Enter the URL of the Server which this API is listening on
  • Click on Save & Test

Add Data Source Add Data Source SimpleJSON Save Data Source

Steps to use this in a dashboard

  • Create or Open a dashboard
  • Go to Dashboard settings > Variables > Add variable
  • Enter the name of choice, e.g. instances
  • Select Data source as the one created previously
  • Enter Query as tag:Name=Web Server and it will search for an EC2 Instance with Name tag as "Web Server", if it finds anything with that name, it will return the instance id(s) for that query.

Add Variable

Query

The query is simple, you can add as many comma separated filters as you want. Here the key should be from the one available in Request Parameters > Filters.N section of this page

<key>=<value>[,<key>=<value>...]

LICENSE

MIT