Comments (3)
hi @yockgen,
Can you point to the API endpoint for alerts you are trying to use? There is support for creating tasks.
from influxdb-client-go.
hi @yockgen,
Can you point to the API endpoint for alerts you are trying to use? There is support for creating tasks.
Hi @powersj,
Thanks for the info! I'm trying to find information on how to use "influx-client-go" to do something like below (to create CHECKS/Endpoint/Rules for Alert):
curl -X POST "http://10.49.76.106:32701/api/v2/checks" \
-H "Authorization: Token xxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Testing 01",
"type": "threshold",
"query": {
"text": "from(bucket: \"intel\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"mem_available_percent\")\n |> filter(fn: (r) => r[\"_field\"] == \"gauge\")\n |> filter(fn: (r) => r[\"host\"] == \"node01\")\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\n |> yield(name: \"last\")",
"editMode": "builder",
"name": "",
"builderConfig": {
"buckets": ["company"],
"tags": [
{
"key": "_measurement",
"values": ["mem_available_percent"],
"aggregateFunctionType": "filter"
},
{
"key": "_field",
"values": ["gauge"],
"aggregateFunctionType": "filter"
},
{
"key": "host",
"values": ["3214261f-3ee2-1169-841c-1c697aa4038c"],
"aggregateFunctionType": "filter"
}
],
"functions": [
{
"name": "last"
}
],
"aggregateWindow": {
"period": "1m",
"fillValues": false
}
}
},
"every": "5m",
"offset": "30s",
"status": "active",
"description": "My check description",
"labels": ["label1", "label2"],
"message": "Check triggered",
"orgID": "xxxxxxx"
}'
Thanks of your guidance!
from influxdb-client-go.
@bednar does this library expose anything for the /api/v2/checks
endpoint? Quick search doesn't seem to show it.
from influxdb-client-go.
Related Issues (20)
- Allow overriding the default User-Agent header HOT 7
- join.time result is empty HOT 2
- Accidential non-nil error when batching with `WriteAPIBlocking` HOT 1
- when influxdb server shutdown, client still send metric, the background goroutine "w.writeProc()" will crash at rand.Intn() after try 52 times HOT 1
- proxy setting via environment var doesn't work
- APIClient().GetChecks return null checks
- TableChanged() doesn't detect yield() boundaries HOT 1
- Allow Querying through InfluxQL HOT 2
- Delete timeseries.
- WriteAPIBlocking and QueryAPI got EOF for sometime
- "influxdb2client E! Write error: json: cannot unmarshal string into Go struct field Error.Err of type error" in logs HOT 3
- QueryWithParams in the influxdb Docker image HOT 1
- Data race in queryAPI
- Query into Point structs HOT 2
- WriteAPIImpl.WritePoint blocks on Encoding error HOT 3
- retention not change after call UpdateBucket HOT 1
- Large queries and intermittent internet connectivity cause truncated dataset to be returned instead of error
- `*api.QueryTableResult` `TableChanged` and `TablePosition` not working HOT 1
- Such a single API sub-client instance can be used concurrently.The performance of the client differs significantly from that of the Inch tool?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from influxdb-client-go.