Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

eventtxhandler.h File Reference


Detailed Description

This handler sends all events registered to the specified hostname and port.

This is typically used to forward events from slave agents to the master agent for logging in the event database and for centralized alert generation.

Wire keywords (standard handler keywords documented in Wire )

Example:

// make the handler, assumes you have bound 'events' to list of events you care about. create handler eventtx { hostname: sentry.mydomain.net port: 4321 regevent: $events }

Events accepted:
TypeDescription
any Events are translated into network format and sent via specified protocol to host

#include <stdio.h>
#include "monitor.h"
#include "wire.h"

Go to the source code of this file.

Data Structures

struct  aw_eventtxhandler_options_t
 Options. More...

struct  aw_eventtxhandler_state_t
 State of handler. More...

struct  aw_eventtxhandler_t
 Event transmitter object (base class). More...


Enumerations

enum  aw_eventtxhandler_protocol_t { AW_EVENTTXHANDLER_PROTOCOL_UDP, AW_EVENTTXHANDLER_PROTOCOL_TCP, AW_EVENTTXHANDLER_PROTOCOL_MC }
 Type of protocol used. More...

enum  aw_eventtxhandler_state_cd_t { AW_EVENTTXHANDLER_IDLE, AW_EVENTTXHANDLER_WAIT_CONNECT, AW_EVENTTXHANDLER_WAIT_WRITE }
 The state codes for each state on handler. More...


Functions

aw_eventtxhandler_t * aw_create_eventtxhandler (const byte_t *hostname, u_int32_t port, aw_eventtxhandler_protocol_t protocol, const aw_eventtxhandler_options_t *options, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *aware_logger)
 Create a log filter handler.

void aw_free_eventtxhandler (aw_eventtxhandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_eventtxhandler (aw_wire_mkhandler_args_t *args)
 Create a eventtxhandler using "wire". See header doc for keyword documentation.


Enumeration Type Documentation

enum aw_eventtxhandler_protocol_t
 

Type of protocol used.

Enumeration values:
AW_EVENTTXHANDLER_PROTOCOL_UDP 
AW_EVENTTXHANDLER_PROTOCOL_TCP 
AW_EVENTTXHANDLER_PROTOCOL_MC 

enum aw_eventtxhandler_state_cd_t
 

The state codes for each state on handler.

Enumeration values:
AW_EVENTTXHANDLER_IDLE 
AW_EVENTTXHANDLER_WAIT_CONNECT 
AW_EVENTTXHANDLER_WAIT_WRITE 


Function Documentation

aw_eventtxhandler_t* aw_create_eventtxhandler (  const byte_t *  hostname,
u_int32_t  port,
aw_eventtxhandler_protocol_t  protocol,
const aw_eventtxhandler_options_t *  options,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  aware_logger
) 
 

Create a log filter handler.

aw_create_eventtxhandler

Parameters:
hostname Hostname or dotted IP string
port Port
protocol UDP,TCP or Multicast protocol choice
options Extra settings
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
aware_logger Aware logger object
Returns:
Handler object

void aw_free_eventtxhandler (  aw_eventtxhandler_t *  h  ) 
 

Free handler and all associated resources.

aw_free_eventtxhandler

Parameters:
h The handler

aw_handler_t* aw_wire_eventtxhandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a eventtxhandler using "wire". See header doc for keyword documentation.

aw_wire_eventtxhandler

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)