mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Merge pull request #84 from YunoHost-Apps/testing
This commit is contained in:
commit
90896f6b45
7 changed files with 19 additions and 15 deletions
|
@ -25,7 +25,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste
|
|||
disrupting their core function._
|
||||
|
||||
|
||||
**Shipped version:** 1.33.0~ynh2
|
||||
**Shipped version:** 1.35.1~ynh1
|
||||
|
||||
**Demo:** https://learn.netdata.cloud/docs/agent/demo-sites/
|
||||
## Disclaimers / important information
|
||||
|
|
|
@ -25,7 +25,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste
|
|||
disrupting their core function._
|
||||
|
||||
|
||||
**Version incluse :** 1.33.0~ynh2
|
||||
**Version incluse :** 1.35.1~ynh1
|
||||
|
||||
**Démo :** https://learn.netdata.cloud/docs/agent/demo-sites/
|
||||
## Avertissements / informations importantes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.33.0/netdata-v1.33.0.tar.gz
|
||||
SOURCE_SUM=d167d4b2d8529119fa4047ae40d22833dac9d360a6ed07c314ba313807c027eb
|
||||
SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.35.1/netdata-v1.35.1.tar.gz
|
||||
SOURCE_SUM=587f6cce421015f8e0a527e3964a4de8cc17085c354498150bc3ade21606bbf9
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
domain=$1
|
||||
domain_label=${domain//\./_} # Replace "." by "_" for the domain label
|
||||
# Add a web_log entry for this new domain
|
||||
cat >> /opt/netdata/etc/netdata/python.d/web_log.conf <<EOF
|
||||
${domain_label}_log:
|
||||
name: '${domain_label}'
|
||||
path: '/var/log/nginx/$domain-access.log'
|
||||
cat >> /opt/netdata/etc/netdata/go.d/web_log.conf <<EOF
|
||||
- ${domain_label}_log:
|
||||
name: '${domain_label}'
|
||||
path: '/var/log/nginx/$domain-access.log'
|
||||
|
||||
EOF
|
|
@ -7,4 +7,4 @@ domain=$1
|
|||
# by deleting every line between:
|
||||
# - the domain label (with "." replaced by "_")
|
||||
# - and the domain file specification (need to replace "." by "\." in order not to get interpreted by sed)
|
||||
sed --in-place "/${domain//\./_}_log/,/${domain//\./\\\.}/d" /opt/netdata/etc/netdata/python.d/web_log.conf
|
||||
sed --in-place "/${domain//\./_}_log/,/${domain//\./\\\.}/d" /opt/netdata/etc/netdata/go.d/web_log.conf
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Real-time performance and health monitoring",
|
||||
"fr": "Monitoring serveur en temps reel"
|
||||
},
|
||||
"version": "1.33.0~ynh2",
|
||||
"version": "1.35.1~ynh1",
|
||||
"url": "http://my-netdata.io/",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
@ -57,23 +57,27 @@ configure_netdata() {
|
|||
|
||||
# Add a web_log entry for every YunoHost domain
|
||||
netdata_add_yunohost_web_logs () {
|
||||
local web_log_file="$final_path/etc/netdata/python.d/web_log.conf"
|
||||
local web_log_file="$final_path/etc/netdata/go.d/web_log.conf"
|
||||
if [ ! -f $web_log_file ] ; then
|
||||
cp $final_path/etc/netdata/orig/python.d/web_log.conf $web_log_file
|
||||
cp $final_path/etc/netdata/orig/go.d/web_log.conf $web_log_file
|
||||
fi
|
||||
if [ -z "$(grep "YUNOHOST" $web_log_file)" ] ; then
|
||||
echo "# ------------YUNOHOST DOMAINS---------------" >> $web_log_file
|
||||
for domain in $(yunohost domain list --output-as plain); do
|
||||
domain_label=${domain//\./_} # Replace "." by "_" for the domain label
|
||||
cat >> $web_log_file <<EOF
|
||||
${domain_label}_log:
|
||||
name: '${domain_label}'
|
||||
path: '/var/log/nginx/$domain-access.log'
|
||||
- ${domain_label}_log:
|
||||
name: '${domain_label}'
|
||||
path: '/var/log/nginx/$domain-access.log'
|
||||
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
chgrp netdata $web_log_file
|
||||
# Manage upgrade case from python to go plugin
|
||||
if [ -f "$final_path/etc/netdata/python.d/web_log.conf" ] ; then
|
||||
ynh_secure_remove --file="$final_path/etc/netdata/python.d/web_log.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
# If PostgreSQL is installed, add a PostgreSQL entry using instance password
|
||||
|
|
Loading…
Add table
Reference in a new issue