|
| 1 | +# Contributing to Scanopy Integrations |
| 2 | + |
| 3 | +We welcome community integrations! This guide explains how to add your integration to the registry. |
| 4 | + |
| 5 | +## Integration Types |
| 6 | + |
| 7 | +| Type | Description | How to Contribute | |
| 8 | +|------|-------------|-------------------| |
| 9 | +| **API** | External integrations that consume the Scanopy API | Add a registry entry pointing to your repo | |
| 10 | +| **Discovery** | Built-in daemon capabilities | Requires a PR to the main Scanopy repo | |
| 11 | + |
| 12 | +## Adding an API Integration |
| 13 | + |
| 14 | +### 1. Create Your Integration Repository |
| 15 | + |
| 16 | +Your repository should include: |
| 17 | + |
| 18 | +**Required files:** |
| 19 | +- `manifest.json` - Integration metadata ([see schema](./schemas/manifest.schema.json)) |
| 20 | +- `README.md` - Setup instructions |
| 21 | +- `LICENSE` - Open source license |
| 22 | + |
| 23 | +**Recommended files:** |
| 24 | +- `Dockerfile` - Container build |
| 25 | +- `docker-compose.yml` - One-command deployment |
| 26 | +- `.env.example` - Example environment variables |
| 27 | + |
| 28 | +See [`templates/python-poll/`](./templates/python-poll/) for a complete example. |
| 29 | + |
| 30 | +### 2. Create Your manifest.json |
| 31 | + |
| 32 | +```json |
| 33 | +{ |
| 34 | + "id": "my-integration", |
| 35 | + "name": "My Integration", |
| 36 | + "description": "What it does (max 200 chars)", |
| 37 | + "categories": ["notifications"], |
| 38 | + "version": "1.0.0", |
| 39 | + "author": { |
| 40 | + "name": "Your Name", |
| 41 | + "github": "yourusername" |
| 42 | + }, |
| 43 | + "repository": "https://github.com/you/scanopy-my-integration", |
| 44 | + "license": "MIT", |
| 45 | + "scanopy": { |
| 46 | + "api_version": 1, |
| 47 | + "scopes": ["hosts:read", "services:read"] |
| 48 | + }, |
| 49 | + "triggers": { |
| 50 | + "poll": { |
| 51 | + "default_interval": 300 |
| 52 | + } |
| 53 | + }, |
| 54 | + "configuration": [ |
| 55 | + { |
| 56 | + "key": "MY_API_KEY", |
| 57 | + "type": "secret", |
| 58 | + "required": true, |
| 59 | + "description": "API key for the target service" |
| 60 | + } |
| 61 | + ] |
| 62 | +} |
| 63 | +``` |
| 64 | + |
| 65 | +### 3. Open a Pull Request |
| 66 | + |
| 67 | +Add an entry to `registry.json`: |
| 68 | + |
| 69 | +```json |
| 70 | +{ |
| 71 | + "id": "my-integration", |
| 72 | + "type": "api", |
| 73 | + "repository": "https://github.com/you/scanopy-my-integration", |
| 74 | + "official": false |
| 75 | +} |
| 76 | +``` |
| 77 | + |
| 78 | +**Important:** |
| 79 | +- The `id` must match your manifest's `id` |
| 80 | +- Use kebab-case for the id (lowercase letters, numbers, hyphens) |
| 81 | +- Set `official` to `false` for community integrations |
| 82 | + |
| 83 | +### 4. Review Process |
| 84 | + |
| 85 | +The Scanopy team will review your PR and may request changes. Once approved, your integration will appear in the registry. |
| 86 | + |
| 87 | +## Adding a Discovery Integration |
| 88 | + |
| 89 | +Discovery integrations require changes to the Scanopy daemon itself. |
| 90 | + |
| 91 | +1. Open an issue on [scanopy/scanopy](https://github.com/scanopy/scanopy) proposing the discovery method |
| 92 | +2. Discuss the approach with maintainers |
| 93 | +3. Submit a PR with the implementation |
| 94 | +4. Upon merge, the Scanopy team will add the registry entry and manifest here |
| 95 | + |
| 96 | +## Categories |
| 97 | + |
| 98 | +Use one or more of these categories in your manifest: |
| 99 | + |
| 100 | +| Category | Use For | |
| 101 | +|----------|---------| |
| 102 | +| `containers` | Docker, Kubernetes, Podman | |
| 103 | +| `virtualization` | Proxmox, VMware, Hyper-V | |
| 104 | +| `cloud` | AWS, GCP, Azure | |
| 105 | +| `networking` | Network devices, SNMP | |
| 106 | +| `asset-management` | DCIM, CMDB, IPAM (NetBox, etc.) | |
| 107 | +| `notifications` | Slack, Discord, PagerDuty | |
| 108 | +| `ticketing` | Jira, ServiceNow, Linear | |
| 109 | +| `monitoring` | Prometheus, Datadog, Grafana | |
| 110 | +| `backup` | Data export, S3, file sync | |
| 111 | + |
| 112 | +## Questions? |
| 113 | + |
| 114 | +Open an issue if you have questions about contributing. |
0 commit comments