When MISP administrators need the admin CLI and maintenance mode
MISP administrators need the admin console and maintenance mode when a shared threat intelligence platform cannot simply be switched off to apply a change. The admin interface gives administrators controlled tools for configuration and database work, and maintenance mode holds the instance in a known state while those changes are made, so analysts and sync partners are not writing into a half-changed system. Many routine edits, such as a single setting, do not justify a window. The first question is whether the change alters data, behavior that users rely on, or anything that background jobs read while they run.
Change types that benefit from a planned window include object template updates, bulk data corrections, table optimization after large deletions, and settings that change how events are processed or shared. Each of these can interact with correlation, background jobs or synchronization while it runs. The web interface remains the right place for single, visible edits and for reviewing what happened. Before scheduling a window, confirm in your version's documentation which settings the console exposes, which operations maintenance mode blocks, and whether it stops background workers or only user access. That answer determines how long the window must be and who needs to be told.
The CLI fits alongside the web interface as the repeatable path for multi-step changes. Command names, arguments and output can differ between releases, so confirm the exact syntax for setSetting, optimiseTables and the template update commands in your runbook against the version you run, and test them on a non-production copy first. Confirm also which operating system account should execute them. Record the command, the operator, the start and end times and the output in your change ticket, and keep approved scripts in version control. Check the MISP GitHub repository and the release notes for your version before automating anything, since a command that worked in one release may change in the next.
Which console tasks suit maintenance mode, setSetting and optimiseTables
Maintenance mode is the coarse switch for a change window. It stops the instance from serving ordinary user traffic while you alter the database, code or configuration that users depend on. The Admin live toggle is the part administrators touch most often, and its effect decides who can still reach the instance during the work. Confirm in your version's documentation exactly which routes stay available to administrators and which are blocked, because that list determines whether you can still verify your change from the web interface.
- Who is affected: Analysts, sync partners and API clients lose access while the mode is on, so notify them and any scheduled PyMISP jobs before the window opens.
- Background work: Confirm whether background workers keep running during the window and whether queued sync or import jobs stall or resume once the mode is off.
- Current state: Record the state of the switch before you change anything so you can restore it exactly, and confirm an administrator account can still log in.
- Restoring service: Turn the mode off only after the change is verified, then check that the web interface and one API call both respond.
- Rollback path: Write down the steps to reverse the change and who decides to use them before the window starts.
Before the window, confirm the switch state and rollback steps are written down; after it, confirm users and automated clients can reach the instance again.
The setSetting command changes one configuration key in the instance's stored settings. Because it touches a single value, it suits small, reviewable changes such as adjusting a limit, a toggle or a logging option. Its effect is not always immediate: some keys are read by the web process on each request, while others are cached or read once by background workers. Confirm for each key whether it takes effect straight away, needs a cache flush, or needs a worker restart.
- One key per step: Change one key at a time and record the old and new values, so a rollback is a single reverse change.
- Cache and worker effects: Confirm whether a cache flush or worker restart is needed before the new value applies to every process.
- Security-sensitive keys: Keys that control outbound fetching, authentication, logging or sharing change exposure as soon as they take effect, so review them against your security baseline first.
- Input validation: Confirm the accepted value format for the key in your version's documentation, since an invalid value may be stored without an obvious error.
- Diagnostics recheck: Re-run the diagnostics page after the change to catch settings flagged as incorrect or risky.
After each change, read the value back, confirm the diagnostics page is clean for that setting, and test one user-visible function that depends on it.
The optimiseTables task is database maintenance. It reorganizes tables to reclaim space and refresh internal structures, which can help after large deletions or heavy churn in event and attribute data. The work is performed by the database engine underneath MISP, so the impact depends on the MySQL or MariaDB version, the storage engine and the table sizes in your instance. Run it only after you have confirmed these details in your own environment, because the cost of a mistake here is a long recovery rather than a quick rollback.
- Locking and load: Table rebuilds can block writes and slow reads on large tables, so schedule the task inside the change window and confirm the effect on your engine version.
- Free disk space: Rebuilds may need temporary space related to the size of the tables being processed, so check free space and growth on the database volume first.
- Backups: Take a database backup, verify that it restores, and confirm the restore steps before you start.
- Concurrent writes: Stop or pause sync, import and automation jobs that write to the database, and confirm the queues are empty.
- Scope and logs: Confirm which tables the task touches and watch the database and application logs while it runs.
After the task finishes, compare free space with the value you recorded, check response times on the event list and search, and review logs for errors.
Updating object templates and other reference data changes what analysts see and what automation produces. Object templates define the fields offered when someone creates an object. Taxonomies, galaxies and warninglists shape tagging, suggestions and warnings. A change here can alter how existing data is read and how downstream consumers interpret exports, so treat it as a change to a shared contract rather than a routine refresh. Record where each data set came from and which version of it you loaded.
- Effect on new and existing objects: Confirm whether an updated template changes existing objects or only new ones, and plan a review of objects that no longer match the template.
- Warninglists and tagging: Changes to warninglists alter which values raise warnings, and changes to taxonomies or galaxies alter tags that feeds, sync partners and detection exports may rely on. Notify those consumers before the update.
- Licensing and provenance: Taxonomies and galaxies are licensed under CC0 1.0 Universal or the 2-clause BSD license, separate from the AGPL software license, so keep a record of the source and license for each data set.
- Version alignment: Match data versions to your release and check the release notes for your version before loading new data.
- Test objects: Create a test object from each changed template and check a known benign value against the updated warninglists.
After the update, confirm that test objects validate, that the expected warnings appear, and that sync and export consumers still parse the results.
Admin CLI options and when each fits a change window
This table compares the main administrative actions in the MISP console: Admin live, single setting changes, table optimization, template and reference data updates, and bulk imports. Read each row by asking what users will see, whether the change can be undone, and whether it fits a window you have planned. The main takeaway is that changes touching the database or bulk data are the hardest to reverse, so they should follow a verified backup and a tested rollback.
| Action | Purpose | User impact and reversibility | When it fits a change window |
|---|---|---|---|
| Enable Admin live | Blocks regular user access so administrators can make changes safely | Users lose access while enabled. Reversible by disabling it again. Confirm which accounts stay active in your version | Before work that should not run with active users, such as database or settings changes |
| Disable Admin live | Restores normal user access after changes and checks are complete | Users regain access immediately. Reversible by enabling it again if problems appear | At the end of the window, after diagnostics and a smoke test pass |
| setSetting for one value | Changes a single configuration key without editing files by hand | Impact depends on the key. Some settings apply at once, others may need a cache clear or worker restart. Reversible if the prior value is recorded | A single, documented change with a known prior value and a planned check afterward |
| optimiseTables | Optimizes database tables after large data changes or deletions | Can slow or briefly lock tables while running, and run time grows with data volume. No direct rollback, so take a backup first. Confirm behavior on your database engine | Off-peak, with Admin live enabled and a verified backup in place |
| Update object templates | Refreshes object template definitions used to validate and structure objects | Affects how new or edited objects are validated. Existing events are usually unaffected. Keep a copy of prior templates to reverse. Confirm the supported command for your version | After reviewing the release notes and testing on a non-production copy |
| Update taxonomies, galaxies and warninglists | Pulls newer reference data used for tagging and warnings | Changes tags, galaxy clusters and warning matches across the instance. Reversible only if you keep the previous data source version. Confirm the update method for your version | After reading the change list and checking how new warnings affect current correlation and sync |
| Bulk data import from CLI | Loads events or attributes in volume from files or scripts | Adds load and may trigger correlation and sync to partners. Bulk deletes are hard to reverse. Confirm import options for your version | Only after a dry run on a copy, with Admin live enabled and a restore point ready |
How to plan and run an admin change inside a maintenance window
This sequence gives a MISP change a known starting point, a communicated window, a controlled write period and a verified end state, so that a console change can be reversed and explained if something goes wrong.
Confirm version and take a verified backup
The administrator records the running MISP version from the administration interface and the release notes for the target version, and confirms which packaging method the instance uses. They then take a database and configuration backup and test that the backup file can be read. Done means the version, backup location and restore steps are written into the change ticket. Confirm with your team how the backup is taken, because a backup that has never been restored is an untested assumption. If the target is a new release, check the upgrade notes before assuming a console change is enough.
Announce the window to users and partners
The change owner posts the planned window to internal users and to any sync partners or community contacts who depend on the instance. The notice states what will be unavailable, what happens to pending sync pushes and pulls, and who to contact during the change. Done means the notice is sent and acknowledged by the people who need to act, such as partners who schedule their own pulls. Ask partners to confirm whether they will hold outbound pushes during the window, since a sync that fails silently is harder to recover than one that was planned around.
Enable maintenance mode and confirm it
The administrator enables maintenance mode from the console with the Admin live command, then checks from a separate session that the web interface and API return the maintenance response rather than normal pages. Background workers should be checked for any jobs still running before the change begins. Done means the instance reports maintenance mode, no new user sessions are accepted, and the queues are idle or understood. Confirm the exact command syntax against the documentation for your installed version, since the console options are version dependent.
Make the change through the console
The administrator runs the planned console commands, such as setting a configuration value with setSetting, optimising tables with optimiseTables, or updating object templates and other data. Each command is run from the change ticket with its exact text and the expected output recorded beside it. Done means every command returns the expected result, and any error stops the change until the cause is understood. Where the same change is repeated across environments, moving these commands into a reviewed script reduces typing errors, makes the order repeatable and leaves a clear record of what ran.
Verify with diagnostics and functional checks
The administrator opens the diagnostics page and compares its results with the baseline taken before the change, then runs a short set of functional checks: log in, search for a known event, open an event, create a test attribute in a test event, and confirm an API query returns expected results. Done means the diagnostics show no new warnings, and each functional check has a recorded pass. Use a test organisation or test event for write checks so that partners do not receive unintended sync content. Scripting these checks as a fixed list makes the verification result comparable from one window to the next.
Disable maintenance mode and watch the queues
The administrator turns off maintenance mode, confirms that normal users can sign in and that background jobs are processing, and checks the worker logs for errors that appeared after the change. Done means the instance accepts normal traffic and the queues drain without new failures. If the change has not behaved as expected, the backup taken in the first step is the rollback path, and the decision to use it should be made and recorded before users return. Confirm with your team who can authorise a rollback during the window.
Record the change and notify completion
The change owner records the commands run, the verification results, the final MISP version, the backup reference and any deviations in the change log. They then notify users and partners that the window has closed and state any follow-up needed, such as a partner re-pull. Done means the change record is complete, reviewed by a second administrator, and linked to the scripts or runbook used. A complete record also helps the next administrator repeat the change or explain it to an auditor.
A scripted change only leaves maintenance mode after verification passes
The change starts once the request is approved and a backup is taken, then maintenance mode is switched on with the Admin live setting so users and background work stop writing to the database. The console command or script runs next, followed by verification checks such as the diagnostics page. If verification passes, maintenance mode is turned off and the outcome is recorded. If it fails, the team restores from the backup before turning maintenance mode off, so the instance never returns to users in an unknown state. Confirm the backup is restorable before the window opens.
Decision path for a scripted MISP change, with a rollback branch.
How to script console commands for repeatable change windows
Scripting the admin console commands turns a change window from a sequence of memory-based keystrokes into a reviewable artifact. When the same steps run in the same order in development, staging and production, configuration drift between environments shrinks, and a peer can read the script before the window instead of reconstructing what an administrator typed afterwards. Keep the script in version control so every change has an author, a reviewer and a history. Store it in the same repository as your other MISP infrastructure code, and require a second person to approve changes to it. Treat the script as the record of intent, and check each run against it rather than against someone's recollection of the session.
Parameterize anything that differs between environments, such as the MISP base URL, the target setting names that depend on your hostname or proxy, file paths, and the list of object template identifiers you intend to update. Keep credentials and API keys out of the script itself and load them from your secrets store at run time. Use one script with one parameter file per environment, so the logic stays identical and only the values change. Confirm each setting name and command argument against the documentation for the MISP version you run before you write it into the script, because the console interface can change between releases.
Capture the full output of every run to a log file and attach it to the change record, along with the script's version identifier and the time it started and ended. Before the window, run the complete script against a non-production copy restored from a recent backup, and compare the resulting configuration with production's current state. Record any command that prompts for input, fails silently or produces warnings, and decide in advance how the script stops on error. Confirm with your change board whether a rollback step is required and whether it can be scripted at the same level of detail as the forward change.
Access, logging and risks of running admin commands
Console commands can change settings, rewrite data and switch off user access for every organization on an instance. The cards below cover who should hold that power, how to record its use, how to protect the credentials scripts depend on, and how to avoid leaving the instance in a state nobody intended.
Limit console access to named administrators
Restrict shell access to the MISP host and the web server user to a short, named list of administrators who need it for their role. Commands such as setSetting and optimiseTables act on the whole instance, so a shared login makes it impossible to tell who changed what. Check who can reach the host over SSH and who can run commands as the web server user, and remove access that is no longer needed. Ask your installer or platform team to confirm how the console user is set up in your environment.
Separate administrators from change approvers
The person who runs a setting change or data update should not be the only person who reviews it. For each change window, record who requested the command, who approved it, and who ran it. This split limits the chance that one account can alter a security-relevant setting without a second check. Agree this model in your change policy before the first maintenance window, and confirm that your ticketing system can hold the approval record.
Log console actions outside the instance
Shell history and MISP's own audit records may not capture every console action in a form you can review later. Forward authentication and command logs from the host to a central log store that administrators cannot quietly edit. Check that timestamps are synchronized, that log retention meets your own policy, and that someone reviews the log after each change window. Confirm with your logging team which log sources and retention periods your organization already requires.
Keep shell history from holding secrets
Commands typed with an API key, database password or token as an argument can be stored in shell history files, where they remain readable by anyone with access to that account. Pass secrets through protected files or environment variables that the script reads at run time, and set history to skip lines beginning with a space where your shell supports it. Review existing history files on the host and remove any stored credentials. Treat any exposed key as compromised and rotate it.
Protect credentials used by maintenance scripts
Scripts that run console commands in a change window often hold an API key or database login with broad rights. Store these credentials in a restricted secrets store, give each script its own least-privilege key, and rotate it after the window closes. Avoid committing scripts with embedded keys to version control. Ask your team which secrets manager is used for the host and who can read those secrets.
Confirm maintenance mode is switched off
Maintenance mode, enabled with the Admin live setting during a change window, stops normal users from working with the instance. If the window ends and no one switches it back, users may be locked out of sharing and analysts may think the platform is broken. Add a closing step to every change script that checks the live status and writes the result to the change record. Confirm the check after each window and include it in your on-call handover.
Questions buyers ask about MISP admin CLI work and outside help
How much effort does a team need to run MISP maintenance windows in-house?
The effort depends less on the commands themselves than on how many people can run them safely and how well the steps are documented. A single administrator can run maintenance mode, change a setting and optimise tables, but the window also needs a rollback plan, a named approver and someone watching background jobs and sync status while work happens. Plan for an engineer who knows the MISP console, a second person who can verify results, and time to rehearse the steps on a copy of the instance before the first production window. Ask your own team to list which steps they have performed before and which would be new.
What drives the cost of outside help for MISP CLI work?
Cost follows the written scope. The main drivers are the number of environments (production, staging, disaster recovery), how many repeatable tasks need scripts, how much testing is required before each window, and how many integrations or sync partners could be affected by a change. Script development is a one-time cost, while running each window and updating scripts after MISP releases recurs. Ask any provider to separate discovery, script build, test runs, change window support and post-window verification, and to state what is excluded. DeployOpen does not publish prices; a quote follows from the agreed written scope.
What does the work need from our side?
The work needs administrator access to the MISP instance and its host, a current backup that has been restored successfully at least once, a staging copy built from the same MISP version, and named people who approve each change. You will also need a documented change calendar, a contact for sync partners if their feeds or events could be interrupted, and access to the diagnostics page and logs. Confirm with your provider how credentials are handled during the engagement and where scripts will be stored and reviewed.
Why is a staging copy needed before a scripted maintenance window?
A staging copy shows how a setting change, table optimisation or object template update behaves on data that resembles production, without risking live events. It also lets you measure how long each step takes on your database size and confirm that background workers recover cleanly afterward. Without staging, the first real run becomes the test. Confirm that your staging environment uses the same MISP release, database engine and Redis configuration as production before you rely on its results.
Can our team run MISP maintenance mode and CLI tasks without a partner?
Yes, if the team has Linux administration experience, understands the MISP console and can follow a tested runbook. Many teams handle routine tasks in-house and bring in outside help for scripting, a first set of change windows or a review of their procedures. The risks to weigh are the depth of knowledge on the MISP release in use, the ability to recover from a failed step, and whether anyone is available outside business hours. Check the official MISP documentation for the commands in your release, and record which commands your administrators have run in production.
How long does it take to design a first scripted maintenance window?
The duration depends on the number of tasks to script, the number of environments that must be covered, how many approvals the change process requires and how much testing the team needs on staging. A first window usually takes longer than later ones because the runbook, rollback steps and verification checks are written for the first time. No fixed figure applies to every environment, so ask a provider to break the schedule into discovery, script development, staging rehearsal and the change window itself, and to tie each stage to a written deliverable.
Should we keep MISP scripts in version control, and who reviews them?
Yes. Store maintenance scripts in version control with a named owner, a review step before each change and a record of which MISP release each script was tested against. Reviewers should check that each script handles errors, logs what it changed and can be reversed. Confirm with your security team how script credentials are stored, and make sure the scripts do not print API keys or database passwords into job logs.
How DeployOpen scopes and supports MISP admin maintenance
DeployOpen scopes MISP maintenance work as a fixed-scope engagement agreed in writing before any change is made. For admin CLI and maintenance mode, that scope usually names the instance, the MISP version in place, the maintenance actions the client needs covered (for example, enabling maintenance mode with Admin live, applying setSetting changes, running optimiseTables, or updating object templates and other data), and who approves each change. The written scope also records what is excluded, such as upgrades, Supervisor worker changes or sync troubleshooting, so that the client's team knows where each responsibility sits. Ask for this scope to name the exact MISP release line and the database engine, because the commands and their effects differ between deployments.
All work runs inside the client's own infrastructure, whether that is their cloud accounts, data centers or an air-gapped network. DeployOpen does not hold administrative credentials on the client's behalf unless the agreement says so, and the client keeps control of the production MISP host, its database and its Redis service. Deliverables for this topic typically include a runbook for each maintenance action, scripts that wrap the console commands for a change window, a rollback procedure, and a list of checks to run before and after each window. Confirm with DeployOpen how these artifacts will be reviewed by your change advisory process, who signs off on them, and where they are stored, because a script that has not passed your own review will not be used in production.
Ongoing support is available as a retainer for teams that run maintenance windows regularly or want help when the MISP release line changes. A retainer can cover updating scripts after MISP changes, reviewing change logs, and joining a window when an administrator needs a second pair of hands. Ask for the retainer terms in writing, including response expectations, what counts as in scope, and how the scripts are maintained between releases. DeployOpen does not publish prices, and a quote follows from the written scope and the retainer terms you agree to.

