Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 18 of 49

Cyclades-TS User Guide: Chapter 3 - Additional Features, pages 167 to 176

Pages 167 to 176 of 454, from Cyclades-TS User Guide

The original document is the PDF (4.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Cyclades TS2000 and Avocent TS2000

Page 167

Chapter 3 - Additional Features Screen 5: *********************************************************** ********* C O N F I G U R A T I O N W I Z A R D ********* *********************************************************** You have 8 available ports on this system. Type 'q' to quit, a valid port number[1-8], or anything else to refresh :

Note: The number of available ports depends on the system you are on. Typing in a valid port number repeats this program except this time it's configuring for the port number you have chosen. Typing 'q' leads to Screen 6.

Screen 6: *********************************************************** ********* C O N F I G U R A T I O N W I Z A R D ********* *********************************************************** (Note: If you are NOT connected to this unit through a console, and you have just reconfigured the IP of this unit, activating the new configurations may cause you to lose connection. In that case, please reconnect to the unit by the new IP address, and manually issue a saveconf to save your configurations to flash.)

Do you want to activate your configurations now? (y/n) [y] :

User Guide

167

Page 168

Generating Alarms Screen 7: *********************************************************** ********* C O N F I G U R A T I O N W I Z A R D ********* *********************************************************** Flash refers to a type of memory that can be erased and reprogrammed in units of memory known as blocks rather than one byte at a time; thus, making updating to memory easier. If you choose to save to flash, your configurations thus far will still be in the memory of the system even after you reboot it. If you don't save to flash and if you were to reboot the system, all your new configurations will be lost and you will have to reconfigure the system. Do you want to save your configurations to flash? (y/n) [n] :

CLI Method To configure certain parameters for a specific serial port: Step 1: At the command prompt, type in the appropriate command to configure desired parameters. To activate the serial port. <string> should be ttyS<serial port number> : config configure line <serial port number> tty <string> To configure conf.DB_facility: config configure conf dbfacility <number> To configure alarm: config configure line <serial port number> alarm <number>

Tip. You can configure all the parameters for a serial port in one line. config configure line <serial port number> tty <string> alarm <number>

168

Cyclades-TS

Page 169

Chapter 3 - Additional Features Step 2: Activate and Save. To activate your new configurations and save them to flash, type: config write

(This is essentially typing signal_ras hup and saveconf from the normal terminal prompt.)

Syslog-ng Configuration to use with Alarm Feature This configuration example is used for the alarm feature. Step 1: Configure the pslave.conf file parameter. In the pslave.conf file the parameters of the alarm feature are configured as: all.alarm 1 conf.DB_facility

2

Step 2: Add lines to syslog-ng.conf. The syslog-ng.conf file needs these lines: # local syslog clients source sysl { unix-stream("/dev/log"); }; # To filter ALARM message with the string "kernel panic" : filter f_kpanic {facility(local2) and level(info) and match("ALARM") and match("kernel panic"); }; # To filter ALARM message with the string "root login" : filter f_root { facility(local2) and level(info) and match("ALARM") and match("root login"); }; # To send e-mail to z@none.com (SMTP's IP address 10.0.0.2) # from the e-mail address a@none.com with subject "ALARM". # The message will carry the current date, the hostname

User Guide

169

Page 170

Generating Alarms # of this unit and the message that was received from the source. destination d_mail1 { pipe("/dev/cyc_alarm" template("sendmail -t z@none.com -f a@none.com -s \"ALARM\" -m \"$FULLDATE $HOST $MSG\" -h 10.0.0.2")); }; # Example to send a pager to phone number 123 (Pager server at 10.0.0.1) with message # carrying the current date, the hostname of this TS and the message that was received from the source : destination d_pager { pipe("/dev/cyc_alarm" template("sendsms -d 123 -m \"$FULLDATE $HOST $MSG\" 10.0.0.1");); }; # Example to send a Link Down trap to server at 10.0.0.1 with message carrying the current # date, the hostname of this unit and the message that received from the source : destination d_trap { pipe("/dev/cyc_alarm" template("snmptrap -v1 10.0.0.1 public \"\" \"\" 2 0 \"\" \ .1.3.6.1.2.1.2.2.1.2.1 s \"$FULLDATE $HOST $MSG\" ");); }; # To send e-mail and snmptrap if message received from local syslog client has the string "kernel panic" :

170

Cyclades-TS

Page 171

Chapter 3 - Additional Features log { source(sysl); filter(f_kpanic); destination(d_mail1); destination(d_trap); }; # To send e-mail and pager if message received from local syslog client has the string # "root login": log { source(sysl); filter(f_root); destination(d_mail1); destination(d_pager); };

Alarm, Sendmail, Sendsms and Snmptrap Alarm This feature is available only for the Console Server Application. The TS sends messages using pager, e-mail, or snmptrap if the serial port receives messages with specific string. To configure this feature: Step 1: Activate alarm in Portslave configuration file. Parameter all.alarm - 0 inactive or <> 0 active. Step 2: Configure filters in the syslog-ng configuration file. filter f_alarm { facility(local[0+conf.DB_facility]) and level(info) and match("ALARM") and match("<your string>"); } ; Example: to filter the ALARM message with the string “kernel panic" (conf.DB_facility is configured with value 1): filter f_kpanic {facility(local1) and level(info) and match("ALARM") and match ("kernel panic"); }; Example: to filter the ALARM message with the string “root login" : filter f_root { facility(local1) and level(info) and match("ALARM") and match("root login"); }; Step 3: Configure actions in the syslog-ng configuration file. (See more details in syslog-ng examples.) Example: alarm is active and if the serial port receives the string “kernel panic," one message will be sent to the pager. User Guide

171

Page 172

Generating Alarms log (source(sysl); filter(f_kpanic); destination(d_pager); }; To send e-mail: destination d_mail { pipe("/dev/cyc_alarm" template("sendmail <pars>"));}; To send a pager message: destination d_pager {pipe("/dev/cyc_alarm" template("sendsms <pars>"));}; To send snmptrap: destination d_trap {pipe("/dev/cyc_alarm" template("snmptrap <pars>")); }; Step 4: Connect filters and actions in the syslog-ng configuration file. Example: alarm is active and if the serial port receives the string “kernel panic," one message will be sent to the pager. log (source(sysl); filter(f_kpanic); destination(d_trap); destination(d_pager); };

Sendmail Sendmail sends a message to a SMTP server. It is not intended as a user interface routine; it is used only to send pre-formatted messages. Sendmail reads all parameters in the command line. If the SMTP server does not answer the SMTP protocol requests sent by sendmail, the message is dropped.

172

Cyclades-TS

Page 173

Chapter 3 - Additional Features Synopsis: sendmail -t <name>[,<name>] [-c <name> [,<name>]] [-b <name> [,<name>]] [-r <name>] -f <name> -s <text> -m <text> -h <SMTP server> [-p <smtp-port>] where: -t <name>[,<name>]

“To: ” Required. Multi-part allowed (multiple names are separated by commas). Names are expanded as explained below.

[-c <name> [,<name>]]

“Cc: ” Optional. Multi-part allowed (multiple names are separated by commas).

[-b <name> [,<name>]]

“Bcc: ” Optional. Multi-part allowed (multiple names are separated by commas).

[-r <name> ]

“Reply-To: ” Optional. Use the Reply-To: field to make sure the destination user can send a reply to a regular mailbox.

-f <name>

“From: ” Required.

-s <text>

"Subject: " Required.

-m <text>

"body" The message body.

-h <SMTP server>

Required. IP address or name of the SMTP server.

[-p <SMTP port>

Optional. The port number used in the connection with the server. Default: 25.

<name>

Any email address.

<text>

A text field. As this kind of field can contain blank spaces, please use the quotation marks to enclose the text.

For example, to send e-mail to z@none.com (SMTP's IP address 10.0.0.2) from the e-mail address a@none.com with subject “sendmail test.” sendmail -t z@none.com -f a@none.com -s "sendmail test" -m "Sendmail test. \n Is it OK??? " -h 10.0.0.2

User Guide

173

Page 174

Generating Alarms Sendsms The sendsms is the Linux command line client for the SMSLink project. It accepts command line parameters that define the message to be sent, and transmits them to the SMS server process running on the designated server. The sendsms was developed specifically for easy calling from shell scripts or similar situations.

Synopsis: sendsms [-r] [-g] [-v] -d dest (-m message or -f msgfile) [-u user] [-p port] server where:

174

-r

Reporting. Additional info will be included in the message printed on stderr (namely, the device name used by the server to send the SMS out, and the message ID attributed to the SMS by the module's SIM card). If any of these items is missing or can't be parsed, a value of “??” will be returned.

-g

Turns debugging on. Will output the entire dialog with the server on stderr (and more).

-h

Displays a short help message and exits.

-v

Displays version information and exits.

-d dest

Required. The GSM network address (i.e. phone number) of the mobile phone the message is to be sent to. Supported format is: [int. prefix - country code] area code - phone number. The international prefix can be either “+” or “00” (or any other value supported by the GSM network provider the server is subscribed to). Some separation characters can be used to beautify the number, but they are purely cosmetic and will be stripped by the server. Those characters are [./- ]. The pause character (',') is not supported. Regarding the international country code, don't forget that its necessity is to be considered respective to the SMS gateway location (the host this client program is connecting to), not the location where the client is run from.

Cyclades-TS

Page 175

Chapter 3 - Additional Features -d dest (cont.)

If there are any doubts, please contact the SMS server administrator for your network. Please always include the area code (even when sending to a destination in the same “area”, i.e., on the same network). The number without the area code, though syntactically correct and accepted by the network, may never get delivered.

-m message

Required (Use one and only one of “-m” or “-f”). The text of the message to be sent. Unless made up of a single word, it will have to be quoted for obvious reasons. Maximum length is 160 characters. A longer message will be truncated (you will be warned about it), but the message will still be sent. At the present time, only 7-bit ASCII is supported for the message text.

-f msgfile

Required (use one and only one of “-m” or “-f”). The name of a text file where the message to send is to be read from. This file can contain multiple lines of text (they will be concatenated), but its total length can't exceed 160 characters. A longer text will be truncated (you will be warned about it), but the message will still be sent. The special file '-' means that input will be read from stdin. At the present time, only 7-bit ASCII is supported for the message text.

-u user

Optional. The server module requires the user to identify her/ himself for logging purposes. No authentication is performed on this information, however. If this parameter is omitted, sendsms will send the UNIX username of the current user. This parameter allows you to override this default behavior (might be useful in the case of automated sending).

-p port

Optional. Communication port on the target server. If provided here, this value will be used to connect to the server. If omitted, the client will query the local system for the port number associated with the “well known service” sms (as defined in /etc/services). If that doesn't return an answer, the compiled-in default value 6701 will be used.

User Guide

175

Page 176

Generating Alarms server

Required. The host name or IP address of the computer where the SMS gateway server process is running. By default, this server will be listening on TCP port 6701. Upon success (when the server module reports that the message was successfully sent), sendsms returns 0. When a problem occurs, a non zero value is returned. Different return values indicate different problems. A return value of 1 indicates a general failure of the client program.

COPYRIGHT: SMSLink is (c) Les Ateliers du Heron, 1998 by Philippe Andersson. Example to send a pager message to phone number 123 (Pager server at 10.0.0.1) with message: sendsms -d 123 -m "Hi. This is a test message send from TS using sendsms" 10.0.0.1

Snmptrap Snmptrap is an SNMP application that uses the TRAP-PDU Request to send information to a network manager. One or more fully qualified object identifiers can be given as arguments on the command line. A type and a value must accompany each object identifier. Each variable name is given in the format specified. If any of the required version 1 parameters - enterpriseoid, agent and uptime - are specified as empty, it defaults to “.1.3.6.1.4.1.3.1.1”, hostname, and host-uptime respectively. Synopsis snmptrap -v 1 [-Ci] [common arguments] enterprise-oid agent generic-trap specific-trap uptime [objectID type value]... snmptrap -v [2c|3] [-Ci] [common arguments] uptime trap-oid [objectID type value]...

176

Cyclades-TS