Skip to content

InfluxDB Datasource

An InfluxDB datasource is a connection definition for a time-series database outside the platform. Once defined, scripts, reports and saved queries reach it by name.

The InfluxDB Datasource screen

The list is filtered by project; the columns show name, description, URL, username and database. The toolbar above it holds refresh, delete, edit, add, clone and filter.

FieldDescription
NameThe datasource’s name; scripts and queries call it by this (max 100 characters)
DescriptionDescription (max 255 characters)
URLThe server’s HTTP address (max 2,048 characters)
UsernameThe user name (max 50 characters)
PasswordThe password (max 50 characters)
DatabaseThe default database for queries run through this datasource (max 50 characters)
Is DefaultWhether this is the project’s default datasource

Database is handed to the client as the connection is made, so a query run through this datasource does not have to name one. A SQL datasource has no such field — there the database is part of the JDBC address.

Credentials are sent only when both the user name and the password are filled in. If either is blank the connection is made anonymously. Against a server with authentication switched off, leave both empty.

The list shows whether a password is set, not the password itself. It is stored encrypted and never handed back to be read. When you edit the record the password field comes up empty: leaving it empty keeps the existing password, and it changes only when you type a new one.

The datasource marked Is Default is where a query that does not name one goes:

ins.runInfluxQL('SELECT ...'); // the default datasource
ins.runInfluxQL('MeterDB', 'SELECT ...'); // by name

Mark only one datasource in a project as the default. Marking a second does not unmark the first, and a call that names no datasource then cannot tell which one it means. The clone button is the easiest way into that state, because it copies every field including Is Default — after cloning, clear the flag on the copy.

Datasource addresses are subject to an allow-list, given as ins.datasource.allowed-hosts. It takes comma-separated hostnames (db.example.com), wildcard subdomains (*.example.com) and CIDR blocks (10.0.0.0/8).

CaseResult
List empty (the default)No address is permitted
Address matches the listPermitted
Address does not matchRejected
Loopback, 0.0.0.0 or a link-local addressRejected whatever the list says

This is deliberate: until the setting is made no datasource works at all, because the alternative would leave a script free to send queries to every address the server can reach. Link-local being closed under all circumstances puts cloud providers’ instance metadata services out of range.

The address is checked in two places: when you save (a rejected address comes back as a form error) and when a query runs.

LimitDefaultWhen it applies
Connect10 secondsA datasource that is down fails fast
Query (read)60 secondsThe time one query may take
Write10 secondsSending the request body

The write timeout applies to InfluxDB only; SQL has no equivalent.

One client is opened per datasource and reused by later queries. Editing or deleting the record closes that client and drops it, so a new address or password takes effect on the next query by itself. No restart is needed.