announcement
Introducing the Opsgenie Source Plugin
CloudQuery is an open source high performance data integration platform designed for security and infrastructure teams. Today, we are happy to announce the release of the Opsgenie source plugin.
Opsgenie is Atlassian's well known on-call and alert management service. It offers tooling that helps teams minimize downtime and quickly respond to incidents.
With the release of
v1.2.0
, the CloudQuery Opsgenie Source Plugin supports fetching the following resources:- escalations into the
opsgenie_escalations
table, - incidents into the
opsgenie_incidents
table,- incident logs into the
opsgenie_incident_logs
table, - incident notes into the
opsgenie_incident_notes
table,
- schedules into the
opsgenie_schedules
table,- schedule on-calls into the
opsgenie_schedule_on_calls
table, - schedule timeline into the
opsgenie_schedule_timeline
table, - schedule rotations into the
opsgenie_schedule_rotations
table,
- services into the
opsgenie_services
table, - teams into the
opsgenie_teams
table, - users into the
opsgenie_users
table,- user teams into the
opsgenie_user_teams
table, - user schedules into the
opsgenie_user_schedules
table.
Let's look at a few use cases to help you get started.
Use cases #
In these examples we're using Postgres database as our destination. This allows us to use its advanced SQL querying methods and JSON manipulation engine.
Rotation details #
Staying current on defined rotations can be challenging. This is especially true if you want to track changes over time.
Use the query below to fetch the current rotation information. Note that Opsgenie allows for repeating rotations that occur during certain days of the week/month.
select
p->>'id' as user_id,
p->>'username' as username,
r.type as rotation_type,
r.start_date as rotation_start_date,
r.end_date as rotation_end_date,
r.time_restriction
from
opsgenie_schedule_rotations as r,
jsonb_array_elements(r.participants) as p
Team details #
The query below allows you to extract information about your organization's current team structure. Additional filtering can be added to filter by user tag or whether a given user is blocked.
select
u.username,
u.role::json->>'name' as user_role,
u.tags as user_tags,
u.blocked as is_user_blocked,
u.verified as is_user_verified,
u.created_at as user_created_at,
t.name as team_name,
t.description as team_description
from
opsgenie_users as u
join
opsgenie_user_teams as ut on ut.user_id = u.id
join
opsgenie_teams as t on t.id = ut.id
Incident details with logs #
To track how your organization responds to an incident and analyze your response, use this query. It is sorted by the incident action date in chronological order.
select
i.id as incident_id,
i.service_id,
i.status as incident_status,
i.tags as incident_tags,
i.priority,
i.owner_team as incident_owner_team,
l.log,
l.created_at as log_created_at
from
opsgenie_incidents as i
join
opsgenie_incident_logs as l on l.incident_id = i.id
where
l.type = 'ACTION'
order by
l.created_at asc
Getting Started #
To get started syncing Opsgenie data, see the Opsgenie source plugin documentation for instructions.
Written by Marcel Tyszkiewicz
Marcel is a senior software engineer at CloudQuery with a focus on developing our range of plugins and ensuring they scale to meet the needs of our customers.