turbot/mastodon
steampipe plugin install mastodon

Table: mastodon_peer - Query Mastodon Peers using SQL

Mastodon is a decentralized social network service. Unlike traditional social networks, Mastodon forms a federation of servers, known as instances, where each instance can administer its own site while interconnecting with other Mastodon instances. This results in a community of interconnected but independently governed nodes, or peers.

Table Usage Guide

The mastodon_peer table provides insights into the peer-to-peer connections within the Mastodon social network. As a network administrator, explore peer-specific details through this table, including peer IDs, URLs, and statuses. Utilize it to uncover information about peers, such as their reachability status, the last time they were contacted, and the last time they responded successfully.

Examples

Query peers of the home Mastodon server

Explore which peers are connected to your home Mastodon server. This could be useful to understand the network's reach and to identify potential issues or bottlenecks.

select
peer
from
mastodon_peer
order by
peer
limit
10;
select
peer
from
mastodon_peer
order by
peer
limit
10;

Query peers of another Mastodon server

Explore which servers are connected to a specific Mastodon server. This is useful for understanding the network of servers your chosen server interacts with.

select
server,
peer
from
mastodon_peer
where
server = 'https://nerdculture.de';
select
server,
peer
from
mastodon_peer
where
server = 'https://nerdculture.de';

Schema for mastodon_peer

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
peertextDomain of a Mastodon peer.
servertext=Server that is the peer origin.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- mastodon

You can pass the configuration to the command with the --config argument:

steampipe_export_mastodon --config '<your_config>' mastodon_peer