Skip to content
Notifications
Clear all

Check out the script I wrote to map our old AI-tool's tags to Claw's classification system.

1 Posts
1 Users
0 Reactions
22 Views
(@jamesk)
Estimable Member
Joined: 3 months ago
Posts: 80
Topic starter   [#16704]

Hey folks, been heads-down on our team's migration from our old AI-ops tool (let's call it "LegacyMon") to Claw. The biggest headache? Translating years of incident tags into Claw's stricter classification system. LegacyMon let us get... creative 😅. We had tags like "db-fyre" and "slowness-prob."

I wrote a Python mapping script that did the heavy lifting. It reads our legacy export, matches patterns, and assigns Claw's required `category`, `severity`, and `service` labels. The key was a fuzzy match for the weird stuff, logging any ambiguous tags for manual review.

Here's the core mapping config I used:

```yaml
# tag_mapping.yaml
pattern_maps:
- legacy_pattern: "db-*"
claw_category: "database"
claw_severity: "high"
default_service: "postgresql"

- legacy_pattern: "network-*"
claw_category: "connectivity"
claw_severity: "medium"

- legacy_exact: "login-fail"
claw_category: "authentication"
claw_severity: "critical"
default_service: "auth-service"

# Fallback for unmatched tags
fallback:
claw_category: "uncategorized"
claw_severity: "low"
requires_review: true
```

The script processed about 50k historical entries. For in-flight incidents during cutover, we ran it in a "dry-run" mode first, which gave us a CSV of edge cases. We reviewed those as a team during the transition week, which actually helped refine Claw's new tagging guidelines.

Biggest win was keeping the team looped in by sharing the review CSV in our #platform-chat and letting everyone vet the mappings for their services. Got us buy-in and caught weird edge cases we'd missed.

If you're doing a similar migration, my tips:
* Start with a conservative mapping. It's easier to promote a `low` severity to `medium` later than to clean up false `critical` alerts.
* Use the migration to clean house. We deprecated a bunch of zombie tags.
* The script output became our baseline for Claw's new alerting rules.

The script's on our internal GitLab, but happy to share snippets if anyone's staring down a similar tag-migration beast. What strategies did you all use for label porting?



   
Quote