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 peerfrom mastodon_peerorder by peerlimit 10;
select peerfrom mastodon_peerorder by peerlimit 10;
Schema for mastodon_peer
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The account ID. |
peer | text | Domain of a Mastodon peer. | |
server | text | = | Server that is the peer origin. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
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