Clean up monitor

TODO

Mugnsoft

what to do when we see the following message :

“The monitor ‘indeed2_copy_probe1’ is still referenced to be executed but not found in the database. Please run the cleanup command” in the console.log, we can see “the monitor indeed_test1 is not found in the config db !”

first get the token:

for HTTPS

curl –cacert /d/GoProj/src/webserver/ssl/localhost.pem -X POST ‘https://ami:9090/login’ -d “username=admin&password=admin”

for HTTP

curl -X POST ‘http://192.168.230.1:9090/login’ -d “username=admin&password=admin”

curl -X DELETE -H “Content-Type: application/x-www-form-urlencoded” -H “Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQE11Z05Tb2Z0LmNvbSIsImV4cCI6MTYxMTUwMzAyNCwiZnVsbE5hbWUiOiJhZG1pbiBNdWdOU29mdCIsImdyb3VwIjoiYWRtaW4iLCJpZCI6ImFkbWluIiwib3JpZ19pYXQiOjE2MTE1MDIxMjR9.xUFvM4k_Z-ZwaI8CZXw0Emcq4XXPcIaF0hOt3dxlkHMYVoCQo-b__6R8TwP8ulXnzp_NEgNw2zFFncbBsDN2IqPGUWP9IitCiLszIlhqn7X2GHh6OvM9pvt82OdB8-jo-mt9DlFFSh7JQBo098zzUJN3i4wwZlhOnnm0n_ayY4j4lsdBbqGONWesUAm0EBVO72osHMjkd3wQCyQ8wrx8K6cExH3ovq_6HjGprh9xEdO6SenTiZbOck5okmLMatLghHKMuYU6Q9SCQ5uFzcq_XQuXdN4vy-xvVIe3QLvsbDRuP94_wvhIh5i828xbC9P-i_48mjeuJHHxFCm2ymMBTw” ‘http://192.168.230.1:8051/monitor/clean/some?keys=indeed2_copy_probe1’