Tripp Lite 0 Idades Manual
Have a look at the manual Tripp Lite 0 Idades Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 7 Tripp Lite manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
201 Chapter 14: Command Line Configuration 14.1.12 Port log To configure serial/network port logging: # config -s config.eventlog.server.address='remote server ip address' # config -s config.eventlog.server.logfacility='facility' 'facility' can be: Daemon Local 0-7 Authentication Kernel User Syslog Mail News UUCP # config -s config.eventlog.server.logpriority='priority' 'priority' can be: Info Alert Critical Debug Emergency Error Notice Warning Assume the remote log server needs a username 'name1' and password 'secr\ et': # config -s config.eventlog.server.username=name1 # config -s config.eventlog.server.password=secret To set the remote path as '/tripplite/logs' to save logged data: # config -s config.eventlog.server.path=/tripplite/logs # config -s config.eventlog.server.type=[none | syslog | nfs | cifs | usb] If the server type is set to usb, none of the other values need to be se\ t. The mount point for storing on a remote USB device is /var/run/portmanager/logdir The following command will synchronize the live system with the new confi\ guration: # config -a
202 Chapter 14: Command Line Configuration 14.1.13 Alerts You can add an email, SNMP or NAGIOS alert by following the steps below. The general settings for all alerts Assume this is our second alert, and we want to send alert emails to joh\ [email protected] and sms's to peter@compnany. com: # config -s config.alerts.alert2.description=MySecondAlert # config -s [email protected] # config -s [email protected] To use NAGIOS to notify of this alert: # config -s config.alerts.alert2.nsca.enabled=on To use SNMP to notify of this alert: # config -s config.alerts.alert2.snmp.enabled=on Increment the total alerts: # config -s config.alerts.total=2 Below are the specific settings depending on the type of alert require\ d: Connection Alert To trigger an alert when a user connects to serial port 5 or network host\ 3: # config -s config.alerts.alert2.host3='host name' # config -s config.alerts.alert2.port5=on # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=login Signal Alert To trigger an alert when a signal changes state on port 1: # config -s config.alerts.alert2.port1=on # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.signal=[ DSR | DCD | CTS ] # config -s config.alerts.alert2.type=signal Pattern Match Alert To trigger an alert if the regular expression '.*0.0% id' is found in ser\ ial port 10's character stream: # config -s "config.alerts.alert2.pattern=.*0.0% id" # config -s config.alerts.alert2.port10=on # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=pattern UPS Power Status Alert To trigger an alert when myUPS (on localhost) or thatUPS (on remote host 192.168.0.50) power status changes between on line, on battery and low battery: # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=ups # config -s config.alerts.alert2.ups1=myUPS@localhost # config -s [email protected]
203 Chapter 14: Command Line Configuration Environmental and Power Sensor Alert # config -s config.alerts.alert2.enviro.high.critical='critical valu\ e' # config -s config.alerts.alert2.enviro.high.warning='warning value'\ # config -s config.alerts.alert2.enviro.hysteresis='value' # config -s config.alerts.alert2.enviro.low.critical='critical value' # config -s config.alerts.alert2.enviro.low.warning='warning value' # config -s config.alerts.alert2.enviro1='Enviro sensor name' # config -s config.alerts.alert2.outlet#='RPCname'.outlet# 'alert2.outlet#' increments sequentially with each added outlet. The sec\ ond 'outlet#' refers to the specific RPC power outlets. # config -s config.alerts.alert2.rpc#='RPC name' # config -s config.alerts.alert2.sensor=[ temp | humid | load | char\ ge] # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=enviro # config -s config.alerts.alert2.ups1='UPSname@hostname' Example1: To configure a temperature sensor alert for a sensor called 'SensorInRo\ om42': # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.enviro.high.critical=60 # config -s config.alerts.alert2.enviro.high.warning=50 # config -s config.alerts.alert2.enviro.hysteresis=2 # config -s config.alerts.alert2.enviro.low.critical=5 # config -s config.alerts.alert2.enviro.low.warning=10 # config -s config.alerts.alert2.enviro1=SensorInRoom42 # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=enviro Example2: To configure a load sensor alert for outlets 2 and 4 for an RPC called \ 'RPCInRoom20': # config -s config.alerts.alert2.outlet1='RPCname'.outlet2 # config -s config.alerts.alert2.outlet2='RPCname'.outlet4 # config -s config.alerts.alert2.enviro.high.critical=300 # config -s config.alerts.alert2.enviro.high.warning=280 # config -s config.alerts.alert2.enviro.hysteresis=20 # config -s config.alerts.alert2.enviro.low.critical=50 # config -s config.alerts.alert2.enviro.low.warning=70 # config -s config.alerts.alert2.rpc1=RPCInRoom20 # config -s config.alerts.alert2.sensor=load # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=enviro
204 Chapter 14: Command Line Configuration Alarm Sensor Alert To set an alert for 'doorAlarm' and 'windowAlarm' which are two alarms co\ nnected to an environmental sensor called 'SensorInRoom3'. Both alarms are disabled on Mondays from 8:15am to 2:30\ pm: # config -s config.alerts.alert2.alarm1=SensorInRoom3.alarm1 (doorA\ larm) # config -s config.alerts.alert2.alarm1=SensorInRoom3.alarm2 (windo\ wAlarm) # config -s config.alerts.alert2.alarmrange.mon.from.hour=8 # config -s config.alerts.alert2.alarmrange.mon.from.min=15 # config -s config.alerts.alert2.alarmrange.mon.until.hour=14 # config -s config.alerts.alert2.alarmrange.mon.until.min=30 # config -s config.alerts.alert2.description='description' # config -s config.alerts.alert2.sensor=temp # config -s config.alerts.alert2.signal=DSR # config -s config.alerts.alert2.type=alarm To enable an alarm for the entire day: # config -s config.alerts.alert2.alarmrange.mon.from.hour=0 # config -s config.alerts.alert2.alarmrange.mon.from.min=0 # config -s config.alerts.alert2.alarmrange.mon.until.hour=0 # config -s config.alerts.alert2.alarmrange.mon.until.min=0 The following command will synchronize the live system with the new confi\ guration: # config -r alerts 14.1.14 SMTP & SMS To set-up an SMTP mail or SMS server with the following details: Outgoing server address mail.company.com Secure connection type SSL Sender [email protected] Server username john Server password secret Subject line SMTP alerts # config -s config.system.smtp.server=mail.company.com # config -s config.system.smtp.encryption=SSL (can also be TLS or None ) # config -s config.system.smtp.sender=John@companycom # config -s config.system.smtp.username=john # config -s config.system.smtp.password=secret # config -s config.system.smtp.subject=SMTP alerts To set-up an SMTP SMS server with the same details as above: # config -s config.system.smtp.server2=mail.company.com # config -s config.system.smtp.encryption2=SSL (can also be TLS or None ) # config -s [email protected] # config -s config.system.smtp.username2=john # config -s config.system.smtp.password2=secret # config -s config.system.smtp.subject2=SMTP alerts The following command will synchronize the live system with the new confi\ guration: # config -a
205 Chapter 14: Command Line Configuration 14.1.15 SNMP To set-up the SNMP agent on the device: # config -s config.system.snmp.protocol=[ UDP | TCP ] # config -s config.system.snmp.trapport='port number' (default is\ 162) # config -s config.system.snmp.address='NMS IP network address' # config -s config.system.snmp.commnity='community name' (v1 and v\ 2c only) # config -s config.system.snmp.engineid='ID' (v3 only) # config -s config.system.snmp.username='username' (v3 only) # config -s config.system.snmp.password='password' (v3 only) # config -s config.system.snmp.version=[ 1 | 2c | 3 ] The following command will synchronize the live system with the new confi\ guration: # config -a 14.1.16 Administration To change the administration settings to: System Name og.mydomain.com System Password (root account) secret Description Device in office 2 # config -s config.system.name=og.mydomain.com # config -P config.system.password (will prompt user for a password) # config -s "config.system.location=Device in office 2" NOTE: The -P parameter will prompt the user for a password, and encrypt \ it. In fact, the value of any config element can be encrypted using the -P parameter, but only encrypted user passwords and system passwords are supported. \ If any other element value were to be encrypted, the value will become inaccessible a\ nd will have to be re-set. The following command will synchronize the live system with the new confi\ guration: # config –a 14.1.17 IP settings To configure the primary network interface with static settings: IP address 192.168.0.23 Netmask 255.255.255.0 Default gateway 192.168.0.1 DNS server 1 192.168.0.1 DNS server 2 192.168.0.2 # config -s config.interfaces.wan.address=192.168.0.23 # config -s config.interfaces.wan.netmask=255.255.255.0 # config -s config.interfaces.wan.gateway=192.168.0.1 # config -s config.interfaces.wan.dns1=192.168.0.1 # config -s config.interfaces.wan.dns2=192.168.0.2 # config -s config.interfaces.wan.mode=static # config -s config.interfaces.wan.media=[ Auto | 100baseTx-FD | 100b\ aseTx-HD | 10baseT-HD ] 10baseT-FD To enable bridging between all interfaces: # config -s config.system.bridge.enabled=on To enable IPv6 for all interfaces # config -s config.system.ipv6.enabled=on To configure the management lan interface, use the same commands as abo\ ve but replace: config.interfaces.wan, with config.interfaces.lan
206 Chapter 14: Command Line Configuration Note: Not all devices have a management LAN interface. To configure a failover device in case of an outage: # config -s config.interfaces.wan.failover.address1='ip address' # config -s config.interfaces.wan.failover.address2='ip address' # config -s config.interfaces.wan.failover.interface=[ eth1 | console | modem ] The network interfaces can also be configured automatically: # config -s config.interfaces.wan.mode=dhcp # config -s config.interfaces.lan.mode=dhcp The following command will synchronize the live system with the new confi\ guration: # /bin/config –-run=ipconfig The following command will synchronize the live system with the new confi\ guration: # config -r ipconfig 14.1.18 Date & Time settings To enable NTP using a server at pool.ntp.org issue the following commands\ : # config -s config.ntp.enabled=on # config -s config.ntp.server=pool.ntp.org Alternatively, you can manually change the clock settings: To change running system time: # date 092216452005.05 Format is MMDDhhmm[[CC]YY][.ss] Then the following command will save this new system time to the hardwar\ e clock: # /bin/hwclock -systohc Alternatively, to change the hardware clock: # /bin/hwclock -- set --date=092216452005.05 Format is MMDDhhmm[\ [CC]YY][.ss] Then the following command will save this new hardware clock time as the\ system time: # /bin/hwclock -hctosys To change the timezone: # config -s config.system.timezone=US/Eastern The following command will synchronize the live system with the new confi\ guration: # config -r time 14.1.19 Dial-in settings To enable dial-in access on the DB9 serial port from the command line wit\ h the following attributes: Local IP Address 172.24.1.1 Remote IP Address 172.24.1.2 Authentication Type: MSCHAPv2 Serial Port Baud Rate: 115200 Serial Port Flow Control: Hardware Custom Modem Initialization: ATQ0V1H0 Callback phone 0800223665 User to dial as user1 Password for user secret Run the following commands: # config -s config.console.ppp.localip=172.24.1.1 # config -s config.console.ppp.remoteip=172.24.1.2 # config -s config.console.ppp.auth=MSCHAPv2 # config -s config.console.speed=115200
207 Chapter 14: Command Line Configuration # config -s config.console.flow=Hardware # config -s config.console.initstring=ATQ0V1H0 # config -s config.console.ppp.enabled=on # config -s config.console.ppp.callback.enabled=on # config -s config.console.ppp.callback.phone1=0800223665 # config -s config.console.ppp.username=user1 # config -s config.console.ppp.password=secret To make the dialed connection the default route: # config -s config.console.ppp.defaultroute=on Please note that supported authentication types are 'None', 'PAP', 'CHAP' and 'MSCHAPv2'. Supported serial port baud-rates are '9600', '19200', '38400', '57600', \ '115200', and '230400'. Supported parity values are 'None', 'Odd', 'Even', 'Mark' and 'Space'. Supported data-bits values are '8', '7', '6' and '5'. Supported stop-bits values are '1', '1.5' and '2'. Supported flow-control values are 'Hardware', 'Software' and 'None'. If you do not wish to use out-of-band dial-in access please note that the procedure for enabling start-u\ p messages on the console port is covered in Chapter 15 - Accessing the Console Port. The following command will synchronize the live system with the new confi\ guration: # config –a 14.1.20 DHCP server To enable the DHCP server on the console management LAN, with settings: Default lease time 200000 seconds Maximum lease time 300000 seconds DNS server1 192.168.2.3 DNS server2 192.168.2.4 Domain name company.com Default gateway 192.168.0.1 IP pool 1 start address 192.168.0.20 IP pool 1 end address 192.168.0.100 Reserved IP address 192.168.0.50 MAC to reserve IP for 00:1e:67:82:72:d9 Name to identify this host John-PC Issue the commands: # config -s config.interfaces.lan.dhcpd.enabled=on # config -s config.interfaces.lan.dhcpd.defaultlease=200000 # config -s config.interfaces.lan.dhcpd.maxlease=300000 # config -s config.interfaces.lan.dhcpd.dns1=192.168.2.3 # config -s config.interfaces.lan.dhcpd.dns2=192.168.2.4 # config -s config.interfaces.lan.dhcpd.domain=company.com # config -s config.interfaces.lan.dhcpd.gateway=192.168.0.1 # config -s config.interfaces.lan.dhcpd.pools.pool1.start=192.168.0.\ 20 # config -s config.interfaces.lan.dhcpd.pools.pool1.end=192.168.0.10\ 0 # config -s config.interfaces.lan.dhcpd.pools.total=1 # config -s config.interfaces.lan.dhcpd.staticips.staticip1.ip=192.1\ 68.0.50 # config -s config.interfaces.lan.dhcpd.staticips.staticip1.mac=00:1\ e:67:82:72:d9 # config -s config.interfaces.lan.dhcpd.staticips.staticip1.host=Joh\ n-PC # config -s config.interfaces.lan.dhcpd.staticips.total=1 The following command will synchronize the live system with the new confi\ guration: # config –a
208 Chapter 14: Command Line Configuration 14.1.21 Services You can manually enable or disable network servers from the command line.\ For example if you wanted to guarantee the following server configuration: HTTP Server Enabled HTTPS Server Disabled Telnet Server Disabled SSH Server Enabled SNMP Server Disabled Ping Replies (Respond to ICMP echo requests) Disabled TFTP server Enabled # config -s config.services.http.enabled=on # config -d config.services.https.enabled # config -d config.services.telnet.enabled # config -s config.services.ssh.enabled=on # config -d config.services.snmp.enabled # config -d config.services.pingreply.enabled # config -s config.services.tftp.enabled=on To set secondary port ranges for any service # config -s config.services.telnet.portbase='port base number' Default: 2000 # config -s config.services.ssh.portbase='port base number' Default: 3000 # config -s config.services.tcp.portbase='port base number' Default: 4000 # config -s config.services.rfc2217.portbase='port base number' Default: 5000 # config -s config.services.unauthtel.portbase='port base number Default: 6000 The following command will synchronize the live system with the new confi\ guration: # config -a 14.1.22 NAGIOS To configure NAGIOS with the following settings: NAGIOS host name b095 (Name of this system) NAGIOS host address 192.168.0.1 (IP to find this device at) NAGIOS server address 192.168.0.10 (upstream NAGIOS server) Enable SDT for NAGIOS ext. Enabled SDT gateway address 192.168.0.1 (defaults to host address) Prefer NRPE over NSCA Disabled (defaults to Disabled) # config -s config.system.nagios.enabled=on # config -s config.system.nagios.name=b095 # config -s config.system.nagios.address=192.168.0.1 # config -s config.system.nagios.server.address=192.168.0.10 # config -s config.system.nagios.sdt.disabled=on (disables SD\ T for nagios extensions) # config -s config.system.nagios.sdt.address=192.168.0.1 # config -s config.system.nagios.nrpe.prefer='' To configure NRPE with following settings: NRPE port 5600 (port to listen on for nrpe. Defaults to 5666) NRPE user user1 (User to run as. Defaults to nrpe) NRPE group group1 (Group to run as. Defaults to nobody) Allow command arguments Enabled # config -s config.system.nagios.nrpe.enabled=on # config -s config.system.nagios.nrpe.port=5600 # config -s config.system.nagios.user=user1 # config -s config.system.nagios.nrpe.group=group1 # config -s config.system.nagios.nrpe.cmdargs=on
209 Chapter 14: Command Line Configuration To configure NSCA with the following settings: NSCA encryption BLOWFISH (can be: [ None | XOR | DES | TRPLEDES | CAST-256 | BLOWFISH | TWOFISH | RIJNDAEL-256 | SERPENT | GOST ] NSCA password secret NSCA check-in interval 5 minutes NSCA port 5650 (defaults to 5667) user to run as User1 (defaults to nsca) group to run as Group1 (defaults to nobody) # config -s config.system.nagios.nsca.enabled=on # config -s config.system.nagios.nsca.encryption=BLOWFISH # config -s config.system.nagios.nsca.secret=secret # config -s config.system.nagios.nsca.interval=2 # config -s config.system.nagios.nsca.port=5650 # config -s config.system.nagios.nsca.user=User1 # config -s config.system.nagios.nsca.group=Group1 The following command will synchronize the live system with the new confi\ guration: # config –a 14.2 General Linux command usage The Console Server platform is a dedicated Linux computer, optimized to provide access to serial consoles of critical server systems and control network connected hosts. Being based around uClinux \ (a small footprint but extensible Linux), it embodies a myriad of popular and proven Linux software modules for networking (N\ etFilter, IPTables), secure access (OpenSSH) and communications (OpenSSL) and sophisticated user authentication (PAM, RADIUS, TACACS+ and LDAP). Many components of the Console Server software are licensed under the GN\ U General Public License (version 2). You may obtain a copy of the GNU General Public License at http://www.fsf.org/copyleft/gpl.html and source code will provided for any of the components of the Software licensed under the GNU General Public Lic\ ense upon request. The Console Servers are built on the 2.6 uClinux kernel as developed by the uClinux project. This is G\ PL code and source can be found: http://cvs.uclinux. org.
210 Chapter 14: Command Line Configuration Supported commands that have config files that can be altered includ\ e: portmanager inetd init ssh/sshd/scp/sshkeygen ucd-snmpd samba fnord (web server) sslwrap Commands you can run from the command line on the Console Server include\ :: loopback bash (shell) busybox http://www.busybox.net/downloads/BusyBox.html (has lots of unix shell commands a\ nd tools) chat dhcpcd ftp hd hwclock iproute iptables netcat ifconfig mii-tool netstat route openntpd ping portmap pppd routed setserial smtpclient stty stunel tcpdump tftp tip traceroute More details on the above Linux commands can found online at: http://en.tldp.org/HOWTO/HOWTO-INDEX/howtos.html http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html http://www.stokely.com/unix.serial.port.resources/serial.switch.html