summaryrefslogtreecommitdiff
path: root/docs/promhttp_8h.html
blob: a4118f27fd1472df33c8dfe6e6669db8b155ee67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>prometheus-client-c: promhttp/include/promhttp.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">prometheus-client-c
   &#160;<span id="projectnumber">0.1.1</span>
   </div>
   <div id="projectbrief">Prometheus client for the C programming language</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_21619567660c3332e6a61228c76007f9.html">promhttp</a></li><li class="navelem"><a class="el" href="dir_8d140c3a8bac3cd45205c9ea74fd211f.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">promhttp.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides a HTTP endpoint for metric exposition References:  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;microhttpd.h&quot;</code><br />
<code>#include &quot;<a class="el" href="prom__collector__registry_8h_source.html">prom_collector_registry.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for promhttp.h:</div>
<div class="dyncontent">
<div class="center"><img src="promhttp_8h__incl.png" border="0" usemap="#promhttp_2include_2promhttp_8h" alt=""/></div>
<map name="promhttp_2include_2promhttp_8h" id="promhttp_2include_2promhttp_8h">
<area shape="rect" id="node4" href="prom__collector__registry_8h.html" title="The collector registry registers collectors for metric exposition. " alt="" coords="230,80,417,107"/>
<area shape="rect" id="node5" href="prom__collector_8h.html" title="A Prometheus collector returns a collection of metrics. " alt="" coords="207,155,338,181"/>
<area shape="rect" id="node7" href="prom__metric_8h.html" title="Functions for retrieving metric samples from metrics given an ordered set of labels. " alt="" coords="317,229,434,256"/>
<area shape="rect" id="node6" href="prom__map_8h_source.html" title="prom_map.h" alt="" coords="189,229,293,256"/>
<area shape="rect" id="node8" href="prom__metric__sample_8h.html" title="Functions for interfacting with metric samples directly. " alt="" coords="195,311,367,338"/>
<area shape="rect" id="node9" href="prom__metric__sample__histogram_8h.html" title="Functions for interacting with histogram metric samples directly. " alt="" coords="391,304,551,345"/>
</map>
</div>
</div>
<p><a href="promhttp_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a712a45634bc22724fef9bedcb2841e00"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="promhttp_8h.html#a712a45634bc22724fef9bedcb2841e00">promhttp_set_active_collector_registry</a> (<a class="el" href="prom__collector__registry_8h.html#a20f07748401fbbde9efc8a718f9bc202">prom_collector_registry_t</a> *active_registry)</td></tr>
<tr class="memdesc:a712a45634bc22724fef9bedcb2841e00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the active registry for metric scraping.  <a href="#a712a45634bc22724fef9bedcb2841e00">More...</a><br /></td></tr>
<tr class="separator:a712a45634bc22724fef9bedcb2841e00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a699ecc3aa11ed601269722f43da2823e"><td class="memItemLeft" align="right" valign="top">struct MHD_Daemon *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="promhttp_8h.html#a699ecc3aa11ed601269722f43da2823e">promhttp_start_daemon</a> (unsigned int flags, unsigned short port, MHD_AcceptPolicyCallback apc, void *apc_cls)</td></tr>
<tr class="memdesc:a699ecc3aa11ed601269722f43da2823e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a daemon in the background and returns a pointer to an HMD_Daemon.  <a href="#a699ecc3aa11ed601269722f43da2823e">More...</a><br /></td></tr>
<tr class="separator:a699ecc3aa11ed601269722f43da2823e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides a HTTP endpoint for metric exposition References: </p>
<ul>
<li>MHD_FLAG: <a href="https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dconst">https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dconst</a></li>
<li>MHD_AcceptPolicyCallback: <a href="https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#index-_002aMHD_005fAcceptPolicyCallback">https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#index-_002aMHD_005fAcceptPolicyCallback</a> </li>
</ul>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a712a45634bc22724fef9bedcb2841e00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a712a45634bc22724fef9bedcb2841e00">&#9670;&nbsp;</a></span>promhttp_set_active_collector_registry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void promhttp_set_active_collector_registry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="prom__collector__registry_8h.html#a20f07748401fbbde9efc8a718f9bc202">prom_collector_registry_t</a> *&#160;</td>
          <td class="paramname"><em>active_registry</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the active registry for metric scraping. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">active_registery</td><td>The target prom_collector_registry_t*. If null is passed, the default registry is used. The registry MUST be initialized. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a699ecc3aa11ed601269722f43da2823e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a699ecc3aa11ed601269722f43da2823e">&#9670;&nbsp;</a></span>promhttp_start_daemon()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct MHD_Daemon* promhttp_start_daemon </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MHD_AcceptPolicyCallback&#160;</td>
          <td class="paramname"><em>apc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>apc_cls</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a daemon in the background and returns a pointer to an HMD_Daemon. </p>
<p>References:</p><ul>
<li><a href="https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dinit">https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dinit</a></li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>struct MHD_Daemon* </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>