Skip to content

Logs & Audit

inSCADA automatically records all significant events on the platform. Logs are stored in a time-series database and can be queried by date range.

Menu: Logs → Log

Event Log

Each event record contains the following information:

FieldDescription
activityOperation name
msgLog message
logSeverityLevel: Information, Warning, Error
dttmTimestamp
projectIdRelated project
EventLevelDescription
Script errorErrorScript execution errors and stack trace
Connection changeInformationConnection start/stop
Configuration changeInformationProject, variable, alarm CRUD operations
User actionInformationLogin, logout, password change

Log entries can be created manually from within scripts:

ins.writeLog("INFO", "Automation", "Shift change completed");
// → OK
var end = ins.now();
var start = ins.getDate(end.getTime() - 3600000); // 1 hour
var logs = ins.getLogsByPage(start, end, 0, 10);

Response:

[
{
"activity": "Script Test",
"dttm": 1774688982859,
"msg": "Documentation test log entry",
"projectId": 153,
"logSeverity": "Information"
}
]

Event logs are retained for 14 days by default. This duration is determined by the InfluxDB retention policy (event_log_rp).


Menu: System → Auth Log

All login attempts (successful and failed) are recorded:

{
"msg": "inscada logged in successfully",
"ip": "0:0:0:0:0:0:0:1",
"username": "inscada",
"date": { "epochSecond": 1774689046 },
"isSuccessful": true
}
FieldDescription
usernameUser who attempted to log in
ipClient IP address
isSuccessfulWhether it was successful
msgDetail message
dateTimestamp
// Check failed login attempts
var attempts = ins.getLastAuthAttempts();
var failed = 0;
for (var i = 0; i < attempts.size(); i++) {
if (!attempts.get(i).isSuccessful) {
failed++;
}
}
if (failed > 5) {
ins.notify("error", "Security",
failed + " failed login attempts!");
}

Login attempts are retained for 365 days (auth_attempt_rp).


Menu: System → Auth Log → Online Users

Displays the currently logged-in users. Administrators can terminate active sessions.


If a script has the log: true setting enabled, each execution result is automatically logged:

  • Successful execution duration
  • Error message and stack trace in case of failure
{
"activity": "test",
"msg": "Script test failed. Cause: TypeError: ins.getScripts is not a function",
"logSeverity": "Error"
}

Debug logs can be written using ins.consoleLog():

ins.consoleLog("Debug: power = " + power + " kW");

These logs appear in the server console output (stdout).

Detailed API: Log API →