mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with a heavy request. Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour.
70 lines
2.7 KiB
HTML
70 lines
2.7 KiB
HTML
<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:8086">
|
|
</datasource-http-settings>
|
|
|
|
<h3 class="page-heading">InfluxDB Details</h3>
|
|
|
|
<div class="gf-form-group">
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form max-width-30">
|
|
<span class="gf-form-label width-10">Database</span>
|
|
<input type="text" class="gf-form-input" ng-model='ctrl.current.database' placeholder="" required></input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form max-width-15">
|
|
<span class="gf-form-label width-10">User</span>
|
|
<input type="text" class="gf-form-input" ng-model='ctrl.current.user' placeholder=""></input>
|
|
</div>
|
|
<div class="gf-form">
|
|
<secret-form-field
|
|
isConfigured="ctrl.current.password || ctrl.current.secureJsonFields.password"
|
|
value="ctrl.current.secureJsonData.password || ''"
|
|
on-reset="ctrl.onPasswordReset"
|
|
on-change="ctrl.onPasswordChange"
|
|
inputWidth="9"
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form">
|
|
<label class="gf-form-label width-8">HTTP Method</label>
|
|
<div class="gf-form-select-wrapper width-8 gf-form-select-wrapper--has-help-icon">
|
|
<select class="gf-form-input" ng-model="ctrl.current.jsonData.httpMode" ng-options="f.value as f.name for f in ctrl.httpMode"></select>
|
|
<info-popover mode="right-absolute">
|
|
You can use either <code>GET</code> or <code>POST</code> HTTP method to query your InfluxDB database. The <code>POST</code>
|
|
method allows you to perform heavy requests (with a lots of <code>WHERE</code> clause) while the <code>GET</code> method
|
|
will restrict you and return an error if the query is too large.
|
|
</info-popover>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="gf-form-group">
|
|
<div class="grafana-info-box">
|
|
<h5>Database Access</h5>
|
|
<p>
|
|
Setting the database for this datasource does not deny access to other databases. The InfluxDB query syntax allows
|
|
switching the database in the query. For example:
|
|
<code>SHOW MEASUREMENTS ON _internal</code> or <code>SELECT * FROM "_internal".."database" LIMIT 10</code>
|
|
<br/><br/>
|
|
To support data isolation and security, make sure appropriate permissions are configured in InfluxDB.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form-group">
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form">
|
|
<span class="gf-form-label">Min time interval</span>
|
|
<input type="text" class="gf-form-input width-6 gf-form-input--has-help-icon" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="10s"></input>
|
|
<info-popover mode="right-absolute">
|
|
A lower limit for the auto group by time interval. Recommended to be set to write frequency,
|
|
for example <code>1m</code> if your data is written every minute.
|
|
</info-popover>
|
|
</div>
|
|
</div>
|
|
</div>
|