📄 om_pgsql.8
字号:
.\" $CoreSDI: om_pgsql.8,v 1.12 2002/03/01 07:31:02 alejo Exp $.\".\" Copyright (c) 2001.\" Core-SDI SA. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. Neither the name of Core-SDI SA nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" derived from om_PostgreSQL.8 by Arthur Korn (arthur@korn.ch) on Thu, 5 Oct 2000.Dd Oct 5, 2000.Dt OM_PGSQL 8.Os Core-SDI.Sh NAME.Nm PostgreSQL output module.Nd.Xr syslogd 8output module used to log on PostgreSQL servers.Sh SYNOPSIS.Nm pgsql.Op Fl s Ar host<:port>.Op Fl u Ar username.Op Fl p Ar password.Op Fl d Ar database.Op Fl t Ar table.Op Fl F.Op Fl P.Sh DESCRIPTION.Nm PostgreSQL output module receives a message as an ascii string and logs it on a PostgreSQL server. Forproper initialization, the following parameters should be set:.Bl -tag -width Ds.It Fl s Ar hostname<:port>Specify the PostgreSQL server hostname and optionally the port..It Fl u Ar usernameSpecifies the username to use on the PostgreSQL server. This usermust have enough permissions to insert on the specified database and table..It Fl p Ar passwordThe plaintext password for this PostgreSQL user. Thus it is recommended NOT toleave.Xr syslog.conf 5world readable if this module is used..It Fl d Ar databaseThe database name to use on the specified PostgreSQL server..It Fl t Ar tableThe table name to use on the specified PostgreSQL database..It Fl FInsert the facility level name on the table on a field named "facility".It Fl PInsert the priority level name on the table on a field named "priority".Sh EXAMPLESExample entry for.Xr syslog.conf 5:.Pp.Bd -literal *.* %pgsql -s logger.mydomain.edu \e -u loguser -p loguserpassword \e -d syslogDB -t syslogTB.PpThe table should have a format like this:.Pp.Bd -literal CREATE TABLE syslogTB ( facility char(10), priority char(10), date date, time time, host varchar(128), message text );.Ed.PpThe field names should be resected. The type of fields.Va hostand.Va msgcan be any text format smaller than 128 and 1024 chars respectively..Sh SEE ALSO.Xr syslog 3 ,.Xr syslog.conf 5 ,.Xr om_classic 8 ,.Xr om_mysql 8 ,.Xr om_peo 8 ,.Xr om_regex 8 ,.Xr om_tcp 8 ,.Xr om_udp 8 ,.Xr peochk 8 ,.Xr syslogd 8.Sh BUGS.Bl -bullet.ItSince the PostgreSQL module is used to connect with username and password,care must be pointed on file permissions and that user permissionson the PostgreSQL server..ItSubmit bugs at this project's Sourceforge Bug reporting system at:http://sourceforge.net/tracker/?func=add&group_id=25741&atid=385117You may also report them directly to the authors; send an email tocore.devel.alat@corest.com, describing the problem the most you can,containing also machine description, hardware description, theconfiguration file (/etc/syslog.conf), the OS description, and theinvoking command line.The more you describe the bug, the faster we can fix it..El
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -