If you have a recent Go installation (see `go.mod` for the minimum version), Git and GNU Make, the following commands will check out the repository and compile the binary from source:
This also works when token token is set using one of the other configuration modes (configuration file or environment variables).
## Other information
### Info URL
The exporter reads the metrics from the Friendica server using its "stats" endpoint.
It should look something like this:
```plain
https://example.com/stats
```
The path will be automatically added to the server URL you provide, so in the above example setting `--server https://example.com` would be sufficient.
If you open this URL in a browser you should see an XML structure with the information that will be used by the exporter.
### Scrape configuration
The exporter will query the friendica server every time it is scraped by prometheus.
If you want to reduce load on the friendica server you need to change the scrape interval accordingly:
```yml
scrape_configs:
- job_name: 'friendica'
scrape_interval: 90s
static_configs:
- targets: ['friendica:9205']
```
### Exported metrics
These metrics are exported by `friendica-exporter`:
| friendica_cron_last_execution | Contains information about the last execution of cron of this Instance |
| friendica_exporter_info | Information about the friendica-exporter |
| friendica_up | Indicates if the metrics could be scraped by the exporter |
| friendica_update_available | Contains information whether a system update is available (0 = no, 1 = yes). The available_version level contains the latest available Friendica version, whereas the version level contains the current installed Friendica version. |
| friendica_update_db_status | Contains information whether a database update was successful (0 = no, 1 = yes) |
| friendica_update_status | Contains information whether a system update was successful (1 = no, 0 = yes) |
| friendica_users_active_half_year | Number of active users of the last half year |
| friendica_users_active_month | Number of active users of the last month |
| friendica_users_active_week | Number of active users of the last week |
| friendica_users_pending | Number of pending users |
| friendica_users_total | Number of total users of this Instance |
| friendica_worker_jpm | Number of jobs per Minute |
| friendica_worker_last_execution | Contains information about the last execution of worker of this Instance |
| friendica_worker_tasks_active | Number of active worker tasks of this Instance |
| friendica_worker_tasks_total | Number of worker tasks of this Instance |
Special thanks goes to https://github.com/xperimental and his contributers, because a lot of code is based on https://github.com/xperimental/nextcloud-exporter