C# Class Centreon_EventLog_2_Syslog.SyslogServer

Show file Open project: centreon/centreon-E2S Class Usage Examples

Public Properties

Property Type Description
Sending_thread Thread
connected bool
sending bool

Public Methods

Method Description
SendEvent ( String eventLogName, System.Diagnostics.EventLogEntry eventLogEntry, Filter filter ) : void

Send event to syslog server using UDP protocol

SetSyslogServer ( String ServerAddress, int ServerPort ) : void
SyslogServer ( String serverAddress ) : System

Definition of distant syslog server. This constructor set UDP protocol.

SyslogServer ( String serverAddress, String protocol ) : System

Definition of distant syslog server

SyslogServer ( String serverAddress, String protocol, int port ) : System

Definition of distant syslog server

SyslogServer ( String serverAddress, String protocol, int port, int memoryBufferMaxSize ) : System

Definition of distant syslog server

SyslogServer ( String serverAddress, String protocol, int port, int memoryBufferMaxSize, Debug &debug ) : System

Definition of distant syslog server

ToString ( ) : String

Obtain all properties of this object

Private Methods

Method Description
PrepareSyslogEvent ( String evebntLogName, System.Diagnostics.EventLogEntry eventLogEntry ) : String

Transform EventLogEntry to String

Send ( String message ) : void

Add syslog event in Queue if can't join TCP syslog server

SendEventByTCP ( String message, String eventLogName, System.Diagnostics.EventLogEntry eventLogEntry, Filter filter ) : System.Boolean

Send event to syslog server using TCP protocol

SendEventByUDP ( String message, String eventLogName, System.Diagnostics.EventLogEntry eventLogEntry, Filter filter ) : System.Boolean

Send event to syslog server

SendThread ( ) : void

Thread to send syslog event to TCP syslog server

SetMessageInBuffer ( String message ) : void

Set syslog event into memory buffer to try to sent it later

SetPort ( int port ) : void

Set and control port number

SetProtocol ( String protocol ) : void

Set and control protocol

SetServerAddress ( String server ) : void

Set and control IP address or DNS

SetSyslogLevelAndFacility ( ) : void

Add syslog facilities and levels into Hashtable

Method Details

SendEvent() public method

Send event to syslog server using UDP protocol
public SendEvent ( String eventLogName, System.Diagnostics.EventLogEntry eventLogEntry, Filter filter ) : void
eventLogName String
eventLogEntry System.Diagnostics.EventLogEntry Event to transfert to syslog server
filter Filter Filter with Syslog facility and level
return void

SetSyslogServer() public method

public SetSyslogServer ( String ServerAddress, int ServerPort ) : void
ServerAddress String
ServerPort int
return void

SyslogServer() public method

Definition of distant syslog server. This constructor set UDP protocol.
public SyslogServer ( String serverAddress ) : System
serverAddress String IP address or DNS
return System

SyslogServer() public method

Definition of distant syslog server
public SyslogServer ( String serverAddress, String protocol ) : System
serverAddress String IP address or DNS
protocol String Protocol: UDP or TCP
return System

SyslogServer() public method

Definition of distant syslog server
public SyslogServer ( String serverAddress, String protocol, int port ) : System
serverAddress String IP address or DNS
protocol String Protocol: UDP or TCP
port int Integer between 1 to 65535
return System

SyslogServer() public method

Definition of distant syslog server
public SyslogServer ( String serverAddress, String protocol, int port, int memoryBufferMaxSize ) : System
serverAddress String IP address or DNS
protocol String Protocol: UDP or TCP
port int Integer between 1 to 65535
memoryBufferMaxSize int Memory buffer size. Only used for TCP protocol.
return System

SyslogServer() public method

Definition of distant syslog server
public SyslogServer ( String serverAddress, String protocol, int port, int memoryBufferMaxSize, Debug &debug ) : System
serverAddress String IP address or DNS
protocol String Protocol: UDP or TCP
port int Integer between 1 to 65535
memoryBufferMaxSize int Memory buffer size. Only used for TCP protocol.
debug Debug Debug object
return System

ToString() public method

Obtain all properties of this object
public ToString ( ) : String
return String

Property Details

Sending_thread public property

public Thread Sending_thread
return Thread

connected public property

public bool connected
return bool

sending public property

public bool sending
return bool