cfengine  3.15.4
About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.
  Fossies Dox: cfengine-3.15.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cf-monitord.c File Reference
#include <generic_agent.h>
#include <mon.h>
#include <eval_context.h>
#include <env_monitor.h>
#include <conversion.h>
#include <vars.h>
#include <signals.h>
#include <scope.h>
#include <known_dirs.h>
#include <man.h>
#include <bootstrap.h>
#include <timeout.h>
#include <time_classes.h>
#include <loading.h>
#include <cleanup.h>
#include <file_lib.h>
Include dependency graph for cf-monitord.c:

Go to the source code of this file.

Enumerations

enum  MonitorControl {
  MONITOR_CONTROL_FORGET_RATE , MONITOR_CONTROL_MONITOR_FACILITY , MONITOR_CONTROL_HISTOGRAMS , MONITOR_CONTROL_TCP_DUMP ,
  MONITOR_CONTROL_NONE
}
 

Functions

static void ThisAgentInit (EvalContext *ctx)
 
static GenericAgentConfigCheckOpts (int argc, char **argv)
 
static void KeepPromises (EvalContext *ctx, const Policy *policy)
 
int main (int argc, char *argv[])
 

Variables

int NO_FORK
 
const ConstraintSyntax CFM_CONTROLBODY []
 
static const char *const CF_MONITORD_SHORT_DESCRIPTION
 
static const char *const CF_MONITORD_MANPAGE_LONG_DESCRIPTION
 
static const struct option OPTIONS []
 
static const char *const HINTS []
 

Enumeration Type Documentation

◆ MonitorControl

Enumerator
MONITOR_CONTROL_FORGET_RATE 
MONITOR_CONTROL_MONITOR_FACILITY 
MONITOR_CONTROL_HISTOGRAMS 
MONITOR_CONTROL_TCP_DUMP 
MONITOR_CONTROL_NONE 

Definition at line 43 of file cf-monitord.c.

Function Documentation

◆ CheckOpts()

◆ KeepPromises()

◆ main()

◆ ThisAgentInit()

static void ThisAgentInit ( EvalContext ctx)
static

Variable Documentation

◆ CF_MONITORD_MANPAGE_LONG_DESCRIPTION

const char* const CF_MONITORD_MANPAGE_LONG_DESCRIPTION
static
Initial value:
=
"cf-monitord is the monitoring daemon for CFEngine. It samples probes defined in policy code and attempts to learn the "
"normal system state based on current and past observations. Current estimates are made available as "
"special variables (e.g. $(mon.av_cpu)) to cf-agent, which may use them to inform policy decisions."

Definition at line 71 of file cf-monitord.c.

Referenced by CheckOpts().

◆ CF_MONITORD_SHORT_DESCRIPTION

const char* const CF_MONITORD_SHORT_DESCRIPTION
static
Initial value:
=
"monitoring daemon for CFEngine"

Definition at line 68 of file cf-monitord.c.

Referenced by CheckOpts().

◆ CFM_CONTROLBODY

const ConstraintSyntax CFM_CONTROLBODY[]
extern

Definition at line 351 of file mod_common.c.

Referenced by KeepPromises().

◆ HINTS

const char* const HINTS[]
static
Initial value:
=
{
"Print the help message",
"Enable debugging output",
"Output verbose information about the behaviour of cf-monitord",
"All talk and no action mode - make no changes, only inform of promises not kept",
"Output the version of the software",
"Ignore system lock",
"Specify an alternative input file than the default. This option is overridden by FILE if supplied as argument.",
"Specify how detailed logs should be. Possible values: 'error', 'warning', 'notice', 'info', 'verbose', 'debug'",
"Print basic information about changes made to the system, i.e. promises repaired",
"Activate internal diagnostics (developers only)",
"Run process in foreground, not as a daemon",
"Ignored for backward compatibility",
"Interface with tcpdump if available to collect data about network",
"Enable colorized output. Possible values: 'always', 'auto', 'never'. If option is used, the default value is 'auto'",
"Log timestamps on each line of log output",
}
#define NULL
Definition: getopt1.c:56

Definition at line 96 of file cf-monitord.c.

Referenced by CheckOpts().

◆ NO_FORK

int NO_FORK
extern

Definition at line 94 of file env_monitor.c.

Referenced by CheckOpts().

◆ OPTIONS

const struct option OPTIONS[]
static
Initial value:
=
{
{"help", no_argument, 0, 'h'},
{"debug", no_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"dry-run", no_argument, 0, 'n'},
{"version", no_argument, 0, 'V'},
{"no-lock", no_argument, 0, 'K'},
{"file", required_argument, 0, 'f'},
{"log-level", required_argument, 0, 'g'},
{"inform", no_argument, 0, 'I'},
{"diagnostic", no_argument, 0, 'x'},
{"no-fork", no_argument, 0, 'F'},
{"histograms", no_argument, 0, 'H'},
{"tcpdump", no_argument, 0, 'T'},
{"color", optional_argument, 0, 'C'},
{"timestamp", no_argument, 0, 'l'},
{NULL, 0, 0, '\0'}
}
#define no_argument
Definition: getopt.h:98
#define required_argument
Definition: getopt.h:99
#define optional_argument
Definition: getopt.h:100

Definition at line 71 of file cf-monitord.c.

Referenced by CheckOpts().