mirror of https://github.com/Aidaho12/haproxy-wi
parent
5b976517a7
commit
2603acf846
|
@ -16,6 +16,8 @@ Web interface(user-friendly web GUI, alerting, monitoring and secure) for managi
|
||||||
|
|
||||||
# Features:
|
# Features:
|
||||||
1. Installation and updating HAProxy, Nginx and Keepalived with HAProxy-WI
|
1. Installation and updating HAProxy, Nginx and Keepalived with HAProxy-WI
|
||||||
|
1. Installation and updating Grafana, Prometheus servers with HAProxy-WI
|
||||||
|
1. Installation and updating HAProxy and Nginx exporters with HAProxy-WI
|
||||||
2. Configure HAProxy, Nginx and Keepalived In a jiffy with HAProxy-WI
|
2. Configure HAProxy, Nginx and Keepalived In a jiffy with HAProxy-WI
|
||||||
3. View and analyse Status of all Frontend/backend server via HAProxy-WI from a single control panel.
|
3. View and analyse Status of all Frontend/backend server via HAProxy-WI from a single control panel.
|
||||||
4. Enable/disable servers through stats page without rebooting HAProxy
|
4. Enable/disable servers through stats page without rebooting HAProxy
|
||||||
|
|
|
@ -432,7 +432,7 @@ def update_db_v_42(**kwargs):
|
||||||
|
|
||||||
def update_ver(**kwargs):
|
def update_ver(**kwargs):
|
||||||
con, cur = get_cur()
|
con, cur = get_cur()
|
||||||
sql = """update version set version = '4.2.0.0'; """
|
sql = """update version set version = '4.2.1.0'; """
|
||||||
try:
|
try:
|
||||||
cur.execute(sql)
|
cur.execute(sql)
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|
|
@ -161,7 +161,7 @@ SyslogIdentifier=waf
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
sudo mv /tmp/waf.service /etc/systemd/system/multi-user.target.wants/waf.service
|
sudo mv /tmp/waf.service /etc/systemd/system/waf.service
|
||||||
sudo bash -c 'cat << EOF > /etc/rsyslog.d/waf.conf
|
sudo bash -c 'cat << EOF > /etc/rsyslog.d/waf.conf
|
||||||
if $programname startswith "waf" then /var/log/waf.log
|
if $programname startswith "waf" then /var/log/waf.log
|
||||||
& stop
|
& stop
|
||||||
|
@ -195,12 +195,13 @@ backend waf
|
||||||
server waf 127.0.0.1:12345 check
|
server waf 127.0.0.1:12345 check
|
||||||
EOF'
|
EOF'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sudo rm -f /tmp/modsecurity.tar.gz
|
||||||
|
sudo rm -rf /tmp/haproxy-$VERSION.tar.gz
|
||||||
|
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable waf
|
sudo systemctl enable waf
|
||||||
sudo systemctl restart waf
|
sudo systemctl restart waf
|
||||||
sudo rm -f /tmp/modsecurity.tar.gz
|
|
||||||
sudo rm -rf /tmp/haproxy-$VERSION.tar.gz
|
|
||||||
|
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "error: Can't start Haproxy WAF service <br /><br />"
|
echo "error: Can't start Haproxy WAF service <br /><br />"
|
||||||
|
|
|
@ -59,13 +59,13 @@ function metrics_waf(name) {
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
function installWaf(ip) {
|
function installWaf(ip1) {
|
||||||
$("#ajax").html('')
|
$("#ajax").html('')
|
||||||
$("#ajax").html('<div class="alert alert-warning">Please don\'t close and don\'t represh page. Wait until the work is completed. This may take some time </div>');
|
$("#ajax").html('<div class="alert alert-warning">Please don\'t close and don\'t represh page. Wait until the work is completed. This may take some time </div>');
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
url: "options.py",
|
url: "options.py",
|
||||||
data: {
|
data: {
|
||||||
installwaf: ip,
|
installwaf: ip1,
|
||||||
token: $('#token').val()
|
token: $('#token').val()
|
||||||
},
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
@ -84,7 +84,7 @@ function installWaf(ip) {
|
||||||
} else if (data.indexOf('success') != '-1' ){
|
} else if (data.indexOf('success') != '-1' ){
|
||||||
$('.alert-danger').remove();
|
$('.alert-danger').remove();
|
||||||
$('.alert-warning').remove();
|
$('.alert-warning').remove();
|
||||||
$("#ajax").html('<div class="alert alert-success">'+data+'</data>');
|
$("#ajax").html('<div class="alert alert-success">WAF service has installed</data>');
|
||||||
showOverviewWaf(ip, hostnamea)
|
showOverviewWaf(ip, hostnamea)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue