After creating user via web interface you can only get admin role but not superadmin role. Creating user via cli
# gvmd --create-user=gigauser -v --role="Super Admin"
may give no result:
Authentication failure for 'gigauser' from unix_socket
You can not change role via webinterface.
To assign user superadmin role directly in database:
# docker compose exec pg-gvm /bin/bash
# psql -U root gvmd
gvmd=# select * from roles;
remember required role
gvmd=# select * from users;
remember user id
gvmd=# select * from role_users;
remember required id
gvmd=# update role_users set role=6 where id=37;
Do not delete elasticsearch files with rm on filesystem, use es api instead.
curl -X GET "localhost:9200/_cluster/health" | jq
or
curl -X GET -u elastic:YourGigaPassword "localhost:9200/_cluster/health" | jq
"status": "red"
List indicies sorted by size:
curl -X GET "localhost:9200/_cat/indices?s=store.size:asc"
Delete index:
curl -X DELETE "localhost:9200/.ds-logs-kubernetes.container_logs-default-2024.11.12-000002"
After that setup index lifecycle management.
Links:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-delete-index.html
https://stackoverflow.com/questions/61327189/how-to-sort-kibana-indices-by-descending-size
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cat-indices.html
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cat-indices.html
Sometimes happens when arrow keys stop working as expected in ubuntu, up arrow which usually stand for search back in history become printscreen and other arrows stop working at all, you can't move cursor, etc.
Fix is easy:
$ sudo udevadm trigger --subsystem-match=input --action=change
Source:
$ '/usr/lib64/nagios/plugins/custom_checks/nrpe_nsclient/nrpe_nsclient.sh' '-H' 'supermega.giga.host.com' -p 5665 -c check_ms_iis_application_pool --args 'DefaultAppPool'
Get-WmiObject : Invalid namespace "root\WebAdministration"
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:320
char:40
+ ... ProcessId = Get-WmiObject -NameSpace 'root\WebAdministration' -class ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], Management
Exception
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C
ommands.GetWmiObjectCommand
OK: Application Pool Started but no process is assigned yet "DefaultAppPool" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'pool_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0 'app_count'=0
Resolution:
You may not have IIS Management Scripts and Tools installed on server(s). You can install it from Server Manager -> Web Server Role -> Role Services -> Management Tools -> IIS Management Scripts and Tools. Make sure you have checked option "IIS Management Scripts and Tools" option
https://stackoverflow.com/questions/41451689/invalid-namespace-root-webadministration-on-iis-7-0