FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
vpp_prometheus_export.c File Reference
+ Include dependency graph for vpp_prometheus_export.c:

Go to the source code of this file.

Data Structures

union  my_sockaddr
 

Macros

#define SERVER_PORT   9482
 
#define ROOTPAGE   "<html><head><title>Metrics exporter</title></head><body><ul><li><a href=\"/metrics\">metrics</a></li></ul></body></html>"
 
#define NOT_FOUND_ERROR   "<html><head><title>Document not found</title></head><body><h1>404 - Document not found</h1></body></html>"
 

Functions

static char * prom_string (char *s)
 
static void dump_metrics (FILE *stream, u8 **patterns)
 
static void http_handler (FILE *stream, u8 **patterns)
 
static int start_listen (u16 port)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ NOT_FOUND_ERROR

#define NOT_FOUND_ERROR   "<html><head><title>Document not found</title></head><body><h1>404 - Document not found</h1></body></html>"

Definition at line 129 of file vpp_prometheus_export.c.

◆ ROOTPAGE

#define ROOTPAGE   "<html><head><title>Metrics exporter</title></head><body><ul><li><a href=\"/metrics\">metrics</a></li></ul></body></html>"

Definition at line 128 of file vpp_prometheus_export.c.

◆ SERVER_PORT

#define SERVER_PORT   9482

Definition at line 36 of file vpp_prometheus_export.c.

Function Documentation

◆ dump_metrics()

static void dump_metrics ( FILE *  stream,
u8 **  patterns 
)
static

Definition at line 52 of file vpp_prometheus_export.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ http_handler()

static void http_handler ( FILE *  stream,
u8 **  patterns 
)
static

Definition at line 132 of file vpp_prometheus_export.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 242 of file vpp_prometheus_export.c.

+ Here is the call graph for this function:

◆ prom_string()

static char* prom_string ( char *  s)
static

Definition at line 39 of file vpp_prometheus_export.c.

+ Here is the caller graph for this function:

◆ start_listen()

static int start_listen ( u16  port)
static

Definition at line 188 of file vpp_prometheus_export.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: