Changeset 10481 in hybrid for branches/releng-9.0


Ignore:
Timestamp:
Apr 13, 2012, 6:54:31 PM (13 years ago)
Author:
rick
Message:

Logging configs and check fixes:

  • Network Status file.
  • SNMPD syslog logging.
Location:
branches/releng-9.0/nanobsd/files
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/etc/newsyslog.conf

    r10437 r10481  
    4242#
    4343/var/log/wlportal.log                   664  3     100  *     J /var/run/wlportal.pid
    44 /var/log/snmpd.log                      644  3     100  *     J /var/run/snmpd.pid
     44/var/log/snmpd.log                      644  3     100  *     J
    4545/var/log/thttpd.log                     644  3     100  *     J
    46 /var/log/pen_wrapper.log                644  3     100  *     J
    4746/var/log/openvpn.log                    644  3     100  *     J
     47/var/log/tinyproxy.log                  644  3     100  *     J
  • branches/releng-9.0/nanobsd/files/etc/rc.conf

    r10448 r10481  
    3131nrpe2_enable="YES"
    3232snmpd_enable="YES"
    33 snmpd_flags="-a -LF w /var/log/snmpd.log"
     33snmpd_flags="-LS w"
    3434
    3535# HTTP(S) proxy server
  • branches/releng-9.0/nanobsd/files/etc/syslog.conf

    r10437 r10481  
    3535!openvpn
    3636*.*                                             /var/log/openvpn.log
     37!tinyproxy
     38*.*                                             /var/log/tinyproxy.log
     39!snmpd
     40*.*                                             /var/log/snmpd.log
  • branches/releng-9.0/nanobsd/files/usr/local/etc/tinyproxy.conf

    r10208 r10481  
    2020#
    2121#Listen 192.168.0.1
    22 Listen 0.0.0.0
     22Listen 172.31.255.1:3128
    2323#
    2424# The Bind directive allows you to bind the outgoing connections to a
     
    6565# but not both.
    6666#
    67 Logfile "/var/log/tinyproxy.log"
    68 # Syslog On
     67#Logfile "/var/log/tinyproxy.log"
     68Syslog On
    6969
    7070#
     
    226226#
    227227ConnectPort 443
    228 ConnectPort 563
     228#ConnectPort 563
  • branches/releng-9.0/nanobsd/files/usr/local/sbin/check-inet-alive

    r10469 r10481  
    99# XXX: Do we need to manage state, like DHCP here?
    1010# XXX: Check if page output is actually the output expected and not some weird captive portal somewhere.
     11# XXX: For effiently reasons this should be combined with the nagios check_inet check
    1112#
    1213# Rick van der Zwet <info@rickvanderzwet.nl>
    1314#
    14 
    15 # Check if we need to check inet at all
    16 . /etc/rc.subr
    17 load_rc_config "lvrouted"
    18 : ${lvouted_enable="NO"}
    19 : ${service_ileiden="NO"}
    20 : ${service_proxy="NO"}
    21 (( checkyesno service_ileiden || checkyesno service_proxy ) && checkyesno lvouted_enable ) || exit 0
    22 
    23 
    2415
    2516TAG=`basename $0`
     
    2718service lvrouted onestatus > /dev/null && LVROUTED_STATUS="running" || LVROUTED_STATUS="stopped"
    2819
     20check_http() {
     21 fetch -o /dev/null -q $* 2>/dev/null
     22}
     23
    2924# Main I-net check
    30 fetch -o /dev/null -q http://proxy-test.wirelessleiden.nl && INET_STATUS=up
     25check_http http://proxy-test.wirelessleiden.nl && INET_STATUS=up
    3126
    3227if [ $INET_STATUS = "down" ]; then
    3328  # Failback internet check
    34   fetch -o /dev/null http://ams-ix.net && INET_STATUS=up
     29  check_http http://ams-ix.net && INET_STATUS=up
    3530fi
    3631
     
    4035  service lvrouted stop | logger -t "$TAG"
    4136fi
     37
     38# Retrieve proxy status
     39export HTTP_PROXY=${HTTP_PROXY-:http://proxy.wleiden.net:3128}
     40PROXY_STATUS=down
     41check_http http://proxy-test.wirelessleiden.nl && PROXY_STATUS=down
     42
     43if [ $INET_STATUS = "down" ]; then
     44  # Failback internet check
     45  check_http http://ams-ix.net && PROXY_STATUS=up
     46fi
     47
     48echo -e "internet=$INET_STATUS\nproxy=$PROXY_STATUS" > /tmp/network.status
Note: See TracChangeset for help on using the changeset viewer.