influxdata / influxdata/chronograf
Chronograf/Kapacitor tick exec script - argument passing
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 250
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
Hi
Chronograf Version: 1.9.1
Kapacitor OSS 1.6.4
We created tick script which should send message to Microfocus opcmsg tool which with argments sends alerts.
For this we created python script which should take argments from tick script:
in logs i see all data needed:
{"id":"Server CPU usage above 80%-host=server1.local","message":"host=server1.local CRITICAL Server CPU usage above 80%-host=server1.local cpu CRITICAL"
how can i pass arguments to this opcmsg python script
python', '/opt/opcmsg_alerting/opparser.py', arg1, arg2, arg3, arg4
where
arg1 = var measurement = 'cpu'
arg2 = var idVar = name + '-{{.Group}}'
arg3 = var levelTag = 'level'
arg4 = var message = '{{.Group}} {{.Level}} {{.ID}} {{.Name}} {{.Level}}'
and than opcmsg argemnts will be populated
i am not a programmer and i really dont know Go so please help
Thanks
tomislav
Contributor guide
Research direction
Start by reviewing the referenced tick script and the Python entry point at /opt/opcmsg_alerting/opparser.py, then reproduce the argument-passing behavior with the reported Chronograf 1.9.1 and Kapacitor 1.6.4 versions. Done means the values for measurement, ID, level, and message arrive as distinct arguments to the opcmsg script; the issue does not name a repository test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100