Skip to content

Commit

Permalink
Change cmd name
Browse files Browse the repository at this point in the history
  • Loading branch information
g.skiba authored and g.skiba committed Jan 9, 2019
1 parent af05c12 commit 7bcae0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ http {
**context:** *http, server*

Create measurement point in all nested locations.
You can use "$location" or "$host" variables which represent the name of the current location and the name of current server with all non-alphanumeric characters replaced with "\_." Leading and trailing "\_" are deleted.
You can use "$location" or "$server_name" variables which represent the name of the current location and the name of current server with all non-alphanumeric characters replaced with "\_." Leading and trailing "\_" are deleted.

Example:

Expand All @@ -113,10 +113,10 @@ Data for `/foo/` will be sent to `nginx.foo`, data for `/bar/` - to `nginx.bar`.
The `<params>` parameter (1.3.0) specifies list of params to be collected for all nested locations. To add all default params, use \*.
The `<if>` parameter (1.1.0) enables conditional logging. A request will not be logged if the condition evaluates to "0" or an empty string.

Example(with $host):
Example(with $server_name):
```nginx
graphite_default_data nginx.$host.$location
graphite_default_data nginx.$server_name.$location
server {
server_name foo_host;
Expand Down
4 changes: 2 additions & 2 deletions src/ngx_http_graphite_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,14 @@ static const ngx_http_graphite_template_arg_t ngx_http_graphite_template_args[TE

typedef enum {
TEMPLATE_VARIABLE_LOCATION,
TEMPLATE_VARIABLE_HOSTS,
TEMPLATE_VARIABLE_SERVER_NAME,
} ngx_http_graphite_default_data_variable_t;

#define DEFAULT_DATA_ARG_COUNT 2

static const ngx_http_graphite_template_arg_t ngx_http_graphite_default_data_args[DEFAULT_DATA_ARG_COUNT] = {
{ ngx_string("location"), TEMPLATE_VARIABLE_LOCATION },
{ ngx_string("host"), TEMPLATE_VARIABLE_HOSTS },
{ ngx_string("server"), TEMPLATE_VARIABLE_SERVER_NAME },
};

#define DEFAULT_DATA_VARIABLES(location, server_name) {location, server_name}
Expand Down

0 comments on commit 7bcae0e

Please sign in to comment.