Skip to content

Commit 4e1ed10

Browse files
Merge pull request DataDog#655 from DataDog/mattw/autometricupdate
some csv files have blank descriptions and utf8 issues
2 parents a8c31b3 + 36c9f4c commit 4e1ed10

File tree

10 files changed

+31
-8
lines changed

10 files changed

+31
-8
lines changed

content/integrations/aws.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sidebar:
1212
href: "#installation"
1313
- text: Configuration
1414
href: "#configuration"
15-
15+
git_integration_title: amazon_web_services
1616
---
1717

1818

@@ -148,6 +148,9 @@ Depending on whether you created a role or a user above, choose the appropriate
148148
4. Choose the services you want to collect metrics for on the left side of the dialog. You can optionally add tags to all hosts and metrics. Also if you want to only monitor a subset of instances on AWS, tag them and specify the tag in the limit textbox here.
149149
5. Click **Install Integration**.
150150

151+
## Metrics
152+
153+
<%= get_metrics_from_git() %>
151154

152155
# Troubleshooting
153156
{: #troubleshooting}

content/integrations/awsrds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ There are 3 options for monitoring RDS instances. You can choose to use standard
3434
2. From the IAM Management Console, create a new role. Enter a name for the role, such as `lambda-datadog-post-execution`.
3535
3. Select **AWS Lambda** from the AWS Service Roles list. You do not need to attach any policies at this time. Press the appropriate buttons to complete the role creation.
3636
4. Click on the role you just created. Expand the Inline Policies section and click the link to create a policy. Choose **Custom Policy** and press the button to continue.
37-
5. Enter a policy name, such as `lambda-datadog-policy`. For Policy Document, enter the following, replacing <ROLE ARN> with the ARN of the role:
37+
5. Enter a policy name, such as `lambda-datadog-policy`. For Policy Document, enter the following, replacing &lt;ROLE ARN> with the ARN of the role:
3838

3939
{
4040
"Version": "2012-10-17",
@@ -45,7 +45,7 @@ There are 3 options for monitoring RDS instances. You can choose to use standard
4545
"kms:Decrypt"
4646
],
4747
"Resource": [
48-
"<ROLE ARN>"
48+
"ROLE ARN>"
4949
]
5050
}
5151
]

content/integrations/awsses.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Amazon Simple Email Service (SES) is a cost-effective, outbound-only email-sendi
2222
Enable this integration to see in Datadog all your SES metrics.
2323

2424

25+

content/integrations/couchbase.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ title: Datadog-Couchbase Integration
33
integration_title: Couchbase
44
kind: integration
55
doclevel: basic
6+
git_integration_title: couchbase
67
---
78

89

910
Get metrics from Couchbase in real time to
1011

1112
* Visualize key Couchbase metrics
1213
* Correlate Couchbase performance with the rest of your applications
14+
15+
## Metrics
16+
17+
<%= get_metrics_from_git() %>

content/integrations/fastly.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ Connect to Fastly to:
1212

1313
See key Fastly metrics (like cache coverage and header size) in context with the rest of your Datadog metrics
1414

15+
## Metrics
16+
17+
<%= get_metrics_from_git() %>

content/integrations/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ In that case you can specify an alias for the metric that will become the metric
126126
In that case:
127127

128128
* The metric type will be a gauge
129-
* The metric name will be jmx.[DOMAIN_NAME].[ATTRIBUTE_NAME]
129+
* The metric name will be jmx.\[DOMAIN_NAME].\[ATTRIBUTE_NAME]
130130

131131
Here is another filtering example:
132132

content/integrations/varnish.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ The following metrics are collected by default with the Varnish integration.
2626

2727
### Metrics
2828

29+
The following metrics are collected:
30+
31+
<%= get_metrics_from_git() %>
2932

3033

3134
#### If you are using Varnish 3.0:

content/integrations/zookeeper.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ From the open-source Agent:
2323

2424

2525

26+
## Metrics
2627

28+
<%= get_metrics_from_git() %>

content/libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Some great folks have written their own libraries to help interact with Datadog.
165165
#### NGINX LUA
166166
{: #community-integration-nginx-lua}
167167

168-
* Emit custom metrics directly from NGINX configurations using the [nginx_lua_datadog] module in your LUA scripts.
168+
* Emit custom metrics directly from NGINX configurations using the [nginx_lua_datadog][72] module in your LUA scripts.
169169

170170
#### Pid-stats
171171
{: #community-integration-pid-stats}

lib/helpers_.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,22 @@ def get_metrics_from_git
6767
ititle = @item[:git_integration_title]
6868

6969
itext = $client.contents('datadog/dogweb', :path => "integration/"+ititle+"/"+ititle+"_metadata.csv").content
70+
# itext.force_encoding('utf-8')
7071
# return Base64.decode64(client.contents('datadog/dogweb', :path => "integration/"+@item[:git_integration_title]+"/desc.mako"))
7172
# return Base64.decode64(itext) #.gsub!(/<%(inherit|include)[^>]*\/>|<%def[^>]*>[^<]*<\/%def>/, '')
7273
metric_string = "<table class='table'>"
73-
CSV.parse(Base64.decode64(itext), :headers => true) do |row|
74+
CSV.parse(Base64.decode64(itext), {:headers => true, :converters => :all}) do |row|
75+
description = row['description']
76+
if description.nil?
77+
description = ' '
78+
end
7479
# row.each do |metric_name, metric_type, interval, unit_name, per_unit_name, description, orientation, integration, short_name |
7580
metric_string += "<tr><td><strong>#{row['metric_name']}</strong><br/>(#{row['metric_type']}"
7681
if row['interval'] != nil
7782
metric_string += " every #{row['interval']} seconds"
7883
end
79-
metric_string += ")</td><td>#{row['description'].gsub '^', ' to the '}"
84+
# if row.has_key?("description")
85+
metric_string += ")</td><td>#{description.gsub '^', ' to the '}"
8086
if row['unit_name'] != nil
8187
metric_string += "<br/>shown as #{row['unit_name']}"
8288
if row['per_unit_name'] != nil
@@ -87,11 +93,11 @@ def get_metrics_from_git
8793
metric_string += "</td></tr>"
8894
end
8995
metric_string+="</table>"
96+
metric_string.force_encoding('utf-8')
9097
output = metric_string
9198
else
9299
output = "<strong>Metrics table is auto-populated based on data from a Datadog internal repo. It will be populated when built into production.</strong>"
93100
end
94-
95101
return output
96102
end
97103

0 commit comments

Comments
 (0)