StackStorm / StackStorm/st2

Feature Request: support multiple, independently configured, sensor instances.

Open
#3,438 8 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Please add the ability to have one sensor running more than once with separate configuration. Others have already worked on this feature as (See PR #1739), but the PR was closed due to (I think) inactivity of @manasdk the initial author.

I am writing a PollingSensor where it would be very nice to have separate configuration for multiple instances of the same sensor. For instance, I have some number of servers with a service that need to be polled for changes. However some servers are with one hosting provider (one set of configuration), and some in a different hosting provider (a separate set of configuration). I would like one instance of my sensor for each hosting provider, and possibly one instance per server.

Though there are only a few of these servers today, that number could become elastic in the future. Also, it would be nice to have separate config for different environments (production vs testing vs dev) without maintaining separate instances of stackstorm. Plus that would allow me to have one environment (say dev) using a higher version of the service than another (say production) with different sensor instances to make sure integrations work as expected.

Also, I think it would make sense for the sensors in git, github, and other packs (aside: I wish bitbucket had a sensor) to allow watching multiple things with perhaps different credentials. Then if there are any issues with one sensor (say misconfiguration, credentials stop working, api version changes for one instance but not another, or something) it won't affect the other sensors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #1739 and the PollingSensor and sensor behavior described in this issue; no source file or test is named. The work is done when multiple instances of one sensor can run with independent configuration, including separate credentials or environments, without one instance's problems affecting the others.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.