1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/netdata_ynh.git synced 2024-09-03 19:46:33 +02:00

Merge pull request #80 from YunoHost-Apps/enh_update_1.34.1

Upgrade to upstream version 1.35.1
This commit is contained in:
JimboJoe 2022-07-06 20:07:38 +02:00 committed by GitHub
commit 7aaaf35e4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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",

View file

@ -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