Measuring Security: Metrics, KRIs and Dashboards, Explained
If you are reading this, you have probably heard a manager ask "how secure are we?" and wondered what number could possibly answer that. Or you have seen "KRI", "KPI" or "dashboard" on a job description and want to know what they mean.
By the end you will be able to explain the difference between a measure and a metric, define a key risk indicator and a key performance indicator, tell a leading indicator from a lagging one, name NIST's four types of security measure, judge whether a metric is any good, and spot the common ways numbers mislead. You will also compute a few real metrics from sample data with SQL.
You should know what risk and controls are. Risk and Security Controls covers them. The hands-on part uses SQLite, as in SQL Basics for Security, but you can follow the results without running it.
1. Why measure security at all?
Security leaders must decide where to spend limited time and money, and must show whether the money is working. Gut feeling cannot do that. The ISC2 Certified in Cybersecurity outline includes measuring cybersecurity effectiveness, with key risk indicators, key metrics, and dashboards, scorecards and reports as its examples (ISC2 CC exam outline).
NIST publishes a guide on the subject, SP 800-55, Measurement Guide for Information Security. Volume 1 (December 2024) explains how organizations can develop security measures to assess whether their policies, procedures and controls are adequate, and how to prioritize and evaluate them. Volume 2 is a separate part of the series (NIST SP 800-55 Vol. 1).
2. The vocabulary, from NIST
People use "measure", "metric" and "indicator" loosely. NIST's glossary in SP 800-55 Vol. 1 gives precise meanings:
| Term | NIST's definition |
|---|---|
| Measurement | "The process of obtaining quantitative values using quantitative methods" |
| Measures | "Quantifiable and objective values that result from measurement" |
| Metrics | "Measures and assessment results designed to track progress, facilitate decision-making, and improve performance with respect to a set target" |
| Key performance indicator (KPI) | "A measure of progress toward intended results" |
| Key risk indicator (KRI) | "A metric used to measure risk" |
| Leading indicator | "A predictive metric that tracks events or behaviors that precede incidents" |
| Lagging indicator | "A metric that tracks the outcome of events or trends" |
(NIST SP 800-55 Vol. 1, glossary.) The guide adds that KRIs and KPIs "are examples of metrics, though not all metrics fall into these categories".
The key step is in the definition of metric: it tracks progress with respect to a set target. A raw number ("we blocked 4 million attacks") is a measure at best. A metric says where you are against where you want to be.
Leading versus lagging: an example
| Kind | Question | Example |
|---|---|---|
| Lagging | What already happened? | Number of security incidents last month |
| Leading | What is likely to cause trouble? | Percentage of systems missing a critical patch, or the age of the oldest missing patch |
Lagging indicators are easy to understand but arrive after the damage. Leading indicators let you act earlier but need more thought to choose well. A healthy set has both.
3. Four kinds of measure
SP 800-55 Vol. 1 separates measures into four types. The first two describe what the controls are doing, and the last two describe results and value:
| Type | What it shows (NIST) | An example |
|---|---|---|
| Implementation | "Demonstrate the progress of specific controls." They look at quantitative outputs and are "usually demonstrated in percentages" | NIST's examples include the percentage of systems with approved system security plans, and the percentage of systems with password policies configured as required |
| Effectiveness | "Evaluate how well implementation processes and controls are working and whether they are meeting desired outcomes" | Whether the patching process actually closes critical flaws, judged from several data points over time |
| Efficiency | "Examine the timeliness of controls by determining the speed at which they give useful feedback and how quickly those issues are addressed" | How long it takes to resolve an incident after it is detected |
| Impact | "Articulate the impact of information security on an organization's unique mission, goals, and objectives": for example costs from security events, business value gained or lost, regulatory fines | NIST's general example is the percentage of the organization's budget devoted to information security controls |
NIST notes that effectiveness and efficiency together are often called "Program Results", and that impact measures "can provide the most direct insight into the value of information security to the organization and are sought by executives." (The effectiveness and efficiency examples in the table are mine, not NIST's.)
4. What makes a good measure
NIST lists characteristics that a reliable security measure should have:
| Characteristic | In plain words |
|---|---|
| Accuracy | The data is correct and tied to the security goal being checked |
| Numeric precision | It uses objective numbers that can be compared |
| Correctness | Data is collected by a defined method, the same way every time |
| Consistency | The result does not depend on who measured it |
| Time-based reference | It is tied to a fixed date or period, so trends are visible |
| Replicability | Repeating the measurement under the same conditions gives the same result |
| Unit-based standardization | Units and formats are standard, so data sets can be compared |
(NIST SP 800-55 Vol. 1, section 3.2.)
How to choose measures
The guide describes four major activities:
- Identify and define the current information security program (assets, stakeholders, goals, policies).
- Develop, test and validate specific measures.
- Prioritize measures based on organizational needs.
- Evaluate the data collected.
The first step comes first for a reason: you cannot choose useful numbers before you know what you are trying to protect, who needs the answer and what the goals are. A common mistake is the opposite, collecting whatever the tools happen to report.
5. Dashboards and scorecards
A dashboard shows a few key numbers at a glance. A scorecard compares them with targets over time. Both are only communication tools: the thinking is in choosing the measures.
NIST observes that after implementation measures are gathered, "further analysis ... is required before the results can be expressed to a non-technical audience." Executives do not want to read 10,000 log lines. They want to know: are we getting better, where is the risk, and what do you need from us?
A practical checklist (this is advice, not a standard):
- Few numbers. Five to ten that matter beat fifty that do not.
- Every number has a target and a trend. "70% patched" means little; "70% patched, target 95%, up from 60% last quarter" is information.
- Every number has an owner who can act on it.
- Show the worst cases, not only averages (see the exercise below for why).
- Define each metric in writing so it means the same thing next quarter.
- Match the audience. Operations teams need detail. Executives need risk, trend and decisions.
6. Practise: compute real metrics
This uses SQLite and invented data, as in SQL Basics for Security. Save as metrics.sql:
CREATE TABLE systems (
hostname TEXT PRIMARY KEY,
owner TEXT, -- NULL = nobody is responsible
patched INTEGER NOT NULL, -- 1 = no critical patch missing, 0 = at least one missing
days_unpatched INTEGER NOT NULL -- days the oldest missing critical patch has been available (0 if patched)
);
INSERT INTO systems VALUES
('web-01', 'alice', 1, 0),
('web-02', 'alice', 1, 0),
('db-01', 'bob', 0, 41),
('db-02', 'bob', 1, 0),
('app-01', 'carol', 0, 12),
('app-02', 'carol', 1, 0),
('mail-01', NULL, 0, 95),
('vpn-01', 'carol', 1, 0),
('file-01', 'bob', 1, 0),
('print-01',NULL, 1, 0);
CREATE TABLE incidents (
id INTEGER PRIMARY KEY,
started_at TEXT NOT NULL, -- when the activity began (as far as known)
detected_at TEXT NOT NULL,
resolved_at TEXT NOT NULL,
severity TEXT NOT NULL
);
INSERT INTO incidents VALUES
(1, '2026-07-03 08:00', '2026-07-03 09:30', '2026-07-03 17:00', 'low'),
(2, '2026-08-11 22:00', '2026-08-13 10:00', '2026-08-15 12:00', 'high'),
(3, '2026-09-02 13:00', '2026-09-02 13:20', '2026-09-02 15:00', 'low'),
(4, '2026-09-20 01:00', '2026-09-24 09:00', '2026-09-27 18:00', 'high'),
(5, '2026-10-14 10:00', '2026-10-14 10:45', '2026-10-15 09:00', 'medium'),
(6, '2026-10-29 03:00', '2026-10-29 09:00', '2026-10-30 12:00', 'medium');
sqlite3 m.db < metrics.sql
sqlite3 -header -column m.db
Metric 1: patch coverage (an implementation measure, and a leading indicator)
SELECT COUNT(*) AS systems, SUM(patched) AS patched,
ROUND(100.0 * SUM(patched) / COUNT(*), 1) AS pct_patched
FROM systems;
systems patched pct_patched
------- ------- -----------
10 7 70.0
Seventy percent. Is that good? Without a target it means nothing. Suppose the target is 95%: you are far off. Now look under the number:
SELECT hostname, owner, days_unpatched FROM systems
WHERE patched = 0 ORDER BY days_unpatched DESC;
hostname owner days_unpatched
-------- ----- --------------
mail-01 95
db-01 bob 41
app-01 carol 12
The most exposed system, mail-01, has been missing a critical patch for 95 days and has no owner. A second view of the same data, "systems unpatched for more than 30 days", gives 2. And "percentage of systems with an owner" gives 80%, which points to a different problem entirely:
SELECT ROUND(100.0 * SUM(CASE WHEN owner IS NOT NULL THEN 1 ELSE 0 END) / COUNT(*), 1) AS pct_with_owner
FROM systems;
pct_with_owner
--------------
80.0
Note the NULL check (the same trap you met in SQL Basics for Security). Ownership is a good example of a measure tied to the account-management ideas in Identity and Access Management Basics: a system nobody owns is a system nobody patches.
Metric 2: how fast incidents are found and fixed (efficiency)
Two common names in the industry are "time to detect" and "time to resolve" (often shown as averages with "mean time to" in front). These names are conventions, not NIST definitions, so always write down exactly what you measure. Here: hours from the activity starting to detection, and from detection to resolution.
SELECT id, severity,
ROUND((julianday(detected_at) - julianday(started_at)) * 24, 1) AS hours_to_detect,
ROUND((julianday(resolved_at) - julianday(detected_at)) * 24, 1) AS hours_to_resolve
FROM incidents;
id severity hours_to_detect hours_to_resolve
-- -------- --------------- ----------------
1 low 1.5 7.5
2 high 36.0 50.0
3 low 0.3 1.7
4 high 104.0 81.0
5 medium 0.8 22.3
6 medium 6.0 27.0
The average across all six:
SELECT ROUND(AVG((julianday(detected_at) - julianday(started_at)) * 24), 1) AS avg_hours_to_detect,
ROUND(AVG((julianday(resolved_at) - julianday(detected_at)) * 24), 1) AS avg_hours_to_resolve
FROM incidents;
avg_hours_to_detect avg_hours_to_resolve
------------------- --------------------
24.8 31.6
"Average detection time: about a day." That sounds fine. Now group by severity:
SELECT severity, COUNT(*) AS n,
ROUND(AVG((julianday(detected_at) - julianday(started_at)) * 24), 1) AS avg_hours_to_detect
FROM incidents GROUP BY severity ORDER BY avg_hours_to_detect DESC;
severity n avg_hours_to_detect
-------- - -------------------
high 2 70.0
medium 2 3.4
low 2 0.9
The high-severity incidents took 70 hours on average to detect, while low-severity ones took under an hour. The overall average hid exactly the cases that matter. This is why the checklist above says to show the worst cases and break numbers down by importance.
Metric 3: incidents per month (a lagging indicator)
SELECT strftime('%Y-%m', detected_at) AS month, COUNT(*) AS incidents
FROM incidents GROUP BY month;
month incidents
------- ---------
2026-07 1
2026-08 1
2026-09 2
2026-10 2
The count went up. Is that bad? Not necessarily: detecting more incidents can mean your detection improved. A lagging count needs context, which is the next point.
7. How numbers mislead
| Trap | What goes wrong |
|---|---|
| Averages hide the tail | The exercise above: a one-day average hid 70-hour detection for serious incidents |
| Vanity metrics | "We blocked 4 million attacks" is large and tells you nothing about risk. It has no target and no decision attached |
| Counts without context | More incidents may mean better detection, fewer may mean you are blind |
| Targets get gamed | Marilyn Strathern's wording of Goodhart's law: "When a measure becomes a target, it ceases to be a good measure" (Wikipedia). If staff are rewarded for closing tickets fast, they close tickets fast, not well |
| A metric that counts only what you already know | Percent of known systems patched says nothing about systems you do not know exist. Asset inventory comes first |
| Mixing definitions | If "incident" or "patched" means something different each month, the trend is meaningless. Define terms in writing |
| Measuring what is easy | Tools report what they can count. Start from the goal, as NIST's first activity says |
| Single scores for "security" | One number for "how secure are we" hides the details people need to act. Use a small set |
8. Measuring people: awareness
Security awareness (training people to spot phishing and follow good habits) is also measured. NIST SP 800-50 Rev. 1, Building a Cybersecurity and Privacy Learning Program (September 2024), describes a life-cycle approach, says the program's goals are behaviour change supporting risk management and a security culture, and suggests metrics and evaluation methods for improving the program over time (NIST SP 800-50 Rev. 1).
Examples of what teams track (examples only, not a NIST list):
- the share of staff who complete training (an implementation-style measure, easy to count but weak evidence of behaviour);
- the share of simulated phishing messages that are reported (a behaviour measure, arguably leading), alongside the share that are clicked;
- how quickly staff report real suspicious messages.
Be careful not to turn these into blame. If staff fear punishment, they stop reporting, and your number gets better while your security gets worse (Goodhart again). Phishing and Social Engineering explain why people are targeted.
9. A note on "due care" and "due diligence"
The ISC2 Certified in Cybersecurity outline lists "due care/diligence" alongside the code of conduct under professional ethics. These two terms come from law and are used in security to mean acting reasonably and responsibly to protect assets, and being able to show you did. Sources do not agree on exactly where one ends and the other begins: some define due care as doing the right protective things and due diligence as investigating and checking, and others describe the reverse. I did not find an authoritative ISC2 glossary entry that settles it. If you are studying for an exam, use the definitions in that exam's official study materials. For practical work, the lesson is the same: measure, document and review, so that you can show what was done and why.
10. Common mistakes
| Mistake | The facts |
|---|---|
| "A measure and a metric are the same" | NIST: a metric tracks progress against a set target. A measure is just a quantifiable value |
| "More metrics means better insight" | A few well-chosen, owned, targeted metrics beat many unowned ones |
| "The overall average tells the story" | Break results down by severity, system or team |
| "A KRI predicts incidents with certainty" | A KRI measures risk. It informs decisions; it does not guarantee outcomes |
| "Lagging indicators are enough" | They arrive after the damage. Add leading ones |
| "Leading indicators are always better" | They are only useful if they truly relate to incidents. Validate them |
| "Everyone should see the same dashboard" | Operations and executives need different views |
| "If the number improved, we are safer" | Check the definition, the data quality and whether the target was gamed |
| "Training completion proves staff are secure" | It proves attendance. Watch behaviour, such as reporting rates |
| "Our metrics are objective, so they can't be wrong" | Bad data, changed definitions and missing assets all distort objective-looking numbers |
Closing
Security metrics turn "are we safe?" into questions you can answer, track and improve. A good metric is defined, measured the same way every time, tied to a target, owned by someone who can act, and chosen to serve a goal. A dashboard is only as good as the thinking behind it, and the biggest danger is a clean-looking number that hides the case that matters.
Keep these points:
- Measure, metric, KPI, KRI: a metric tracks progress against a target; a KRI is a metric that measures risk.
- Leading and lagging: use both.
- Four types (NIST): implementation, effectiveness, efficiency, impact.
- Good measures are accurate, consistent, repeatable, time-referenced and in standard units.
- Start from goals and audience, then pick measures.
- Show targets, trends, owners and the worst cases.
- Beware averages, vanity metrics, gamed targets and unknown assets.
- Measure behaviour, not blame, especially for awareness.
If you can take a metric, say what type it is, what target it needs, who owns it and how it might mislead, you understand the foundation.
Related: Risk and Security Controls explains the risks and controls these numbers describe, Security Operations covers the detection, response and patching processes being measured, and False Positives and False Negatives shows how to judge the accuracy of a detector, which is a related but different question.