Skip to content

Commit

Permalink
Merge branch 'main' into EW-1011
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneRadtke-Cap authored Nov 4, 2024
2 parents 72bc201 + 2dd9ccb commit ee7448a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
1 change: 0 additions & 1 deletion ansible/host_vars/prod-nbc/cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ SCHULCONNEX_CLIENT__API_URL: "https://api-dienste.moin.schule/v1"
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: "https://auth.moin.schule/realms/moins/protocol/openid-connect/token"

PROVISIONING_SCHULCONNEX_POLICIES_INFO_URL: "https://api-dienste.moin.schule/v1/policies-info"
FEATURE_SCHULCONNEX_MEDIA_LICENSE_ENABLED: "true"

FEATURE_PREFERRED_CTL_TOOLS_ENABLED: "false"
41 changes: 41 additions & 0 deletions ansible/roles/mongodb_query_exporter/templates/values.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -926,3 +926,44 @@ aggregations:
}
}
]


- database: {{ mongodb_query_exporter_mongodb_sc_db_name }}
collection: files
metrics:
- name: sc_files_security_check_last_seven_days
type: gauge
help: 'Legacy files scan results in the last 7 days'
value: total
overrideEmpty: true
emptyValue: 0
labels: [status]
constLabels: {}
mode: pull
pipeline: |
[
{ "$match": { "isDirectory": false, "securityCheck": { "$exists": true } } },
{
"$match": {
"$expr": {
"$gte": [
"$createdAt",
{ "$subtract": ["$$NOW", 604800000] }
]
}
}
},
{
"$group": {
"_id": "$securityCheck.status",
"total": { "$sum": 1 }
}
},
{
"$project": {
"_id": 0,
"status": "$_id",
"total": "$total"
}
}
]

0 comments on commit ee7448a

Please sign in to comment.