24
2
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
pitchum 2499c291c3 Fix link in README. 2023-01-03 21:36:57 +01:00
pitchum 678d45f892 Trying to include metrics without too much effort. 2022-12-26 11:30:50 +01:00
pitchum 0b9eabac7a Add host.server.distribution 2022-12-26 11:26:50 +01:00
3 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,3 @@
# ChaprilInfos generator
Cf. https://admin.chapril.org/doku.php?id=admin:services:statoolinfos.chapril.org
Cf. https://admin.chapril.org/admin/services/stats.chatons.org

View File

@ -1,8 +1,8 @@
# [File]
file.class=service
file.generator=StatoolInfos
file.generator= Homemade bash script
file.datetime=__LAST_UPDATE__
file.protocol=StatoolInfos-0.3.0
file.protocol=ChatonsInfos-0.5-homemade
# [Service]
service.name=XMPP Chapril
@ -25,6 +25,7 @@ service.install.type=DISTRIBUTION
# [Host]
host.name=Hetzner
host.server.type=VIRTUAL
host.server.distribution=Debian
host.provider.type=HOSTEDSERVER
host.country.name=Allemagne
host.country.code=DE
@ -44,9 +45,8 @@ metrics.accounts.total.count = __TOTAL_USER_ACCOUNTS__
metrics.accounts.active.name = Nombre de comptes actifs
metrics.accounts.active.description = Nombre de comptes vraiment utilisés récemment
metrics.users.total.__CURRENT_YEAR__ = __ACTIVE_USER_YEAR__
metrics.accounts.active.lastyear = __ACTIVE_USER_YEAR__
metrics.accounts.active.lastmonth = __ACTIVE_USER_MONTH__
metrics.accounts.active.lastweek = __ACTIVE_USER_WEEK__
subs.metrics-2020=https://xmpp.chapril.org/.well-known/chaprilinfos/xmppchaprilorg-metrics-2020.properties
subs.metrics-2021=https://xmpp.chapril.org/.well-known/chaprilinfos/xmppchaprilorg-metrics-2021.properties

View File

@ -7,6 +7,7 @@ main() {
cat "${TEMPLATE}" \
| sed "s/__EJABBERD_VERSION__/$(get_ejabberd_version)/" \
| sed "s/__LAST_UPDATE__/$(date -Iminutes)/" \
| sed "s/__CURRENT_YEAR__/$(date +%Y)/" \
| sed "s/__TOTAL_USER_ACCOUNTS__/$(count_user_accounts)/" \
| sed "s/__ACTIVE_USER_WEEK__/$(user_activity 7)/" \
| sed "s/__ACTIVE_USER_MONTH__/$(user_activity 30)/" \