According to the Documentation for AppKiller Assault,
When the configured methods are called in the application, the Chaos Monkey will shut down the application.
But I am not able to achieve this. I configured the watcher bean but as soon as I call /attack API, my application is getting terminated. Instead what I want is when the program is executing the particular bean, then only it should terminate.
Here is my assault setting
{
"level": 5,
"latencyRangeStart": 2000,
"latencyRangeEnd": 5000,
"latencyActive": false,
"exceptionsActive": false,
"exception":{
"type": null,
"arguments": null
},
"killApplicationActive": true,
"memoryActive": false,
"memoryMillisecondsHoldFilledMemory": 90000,
"memoryMillisecondsWaitNextIncrease": 1000,
"memoryFillIncrementFraction": 0.15,
"memoryFillTargetFraction": 0.25,
"runtimeAssaultCronExpression": "OFF",
"watchedCustomServices":[
"myclass.method"
]
}
And Here is my watcher config
{
"controller": false,
"restController": false,
"service": true,
"repository": true,
"component": true,
"beans ": [
"myBean"
]
}
Even if I set runtimeAssaultCronExpression
along with killApplicationActive to true, it immediately shut down the application.
can someone point the mistake I am doing ?
Related
How can we do to set up the consul use a previous certificate created for the tomcat?
We only have server.jks file used in tomcat, and we need to use the same tomcat certification.
How can we do to extract this information below?
"ca_file": "cert/ca.pem",
"cert_file": "cert/server.pem",
"key_file": /cert/serverkey.pem",
The server.conf
{
"bootstrap": true,
"server": true,
"datacenter": "dc1",
"data_dir": "data",
"verify_incoming": true,
"verify_outgoing": true,
"verify_server_hostname": true,
"auto_encrypt": {
"allow_tls": true
},
"log_level": "INFO",
"enable_agent_tls_for_checks": true,
"enable_syslog": false,
"ui_config": {
"enabled": true
},
"ports": {
"http": -1,
"https": 8500
}
}
I am wondering whether consul watch handler can be passed some dynamic information while it's called.
That means watch mechanism can pass the script more arguments instead of my given arguments like the below example.
{
"watches": [
{
"type": "service",
"args": ["/tmp/dosomething.sh", "how can i get responses from /v1/health/service here"]
}
]
}
By the way, when I want to 'watch' a service, the most important info to me is the service's state(passing or critial), but I don't understand:
when watch type is 'service', why I cannot appoint the 'service'.
when watch type is 'checks', why I cannot appoint state and service concurrently.
consul watch passes the entire API response payload as an argument to the watch handler script. Your script needs to be able to consume and parse the JSON, and then act on the data provided.
When you watch a service, the data returned is from the /v1/health/service/:service endpoint. (See consul/api/watch/funcs.go.)
when watch type is 'service', why I cannot appoint the 'service'.
I assume you mean that you would like to watch a specific service. If so, this is supported. You can specify a specific service to watch using the -service flag. For example, consul watch -type=service -service=assets.
when watch type is 'checks', why I cannot appoint state and service concurrently.
If you're interested in monitoring checks for a particular service, you should just use the aforementioned watch command for a specific service. The service check information is included in the API response.
$ consul watch -type=service -service=assets
[
{
"Node": {
"ID": "f013522f-aaa2-8fc6-c8ac-c84cb8a56405",
"Node": "hashicorp-consul-server-2",
"Address": "10.0.0.82",
"Datacenter": "dc2",
"TaggedAddresses": null,
"Meta": null,
"CreateIndex": 22898191,
"ModifyIndex": 22898191
},
"Service": {
"ID": "assets-v1",
"Service": "assets",
"Tags": [],
"Meta": null,
"Port": 9090,
"Address": "",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false,
"CreateIndex": 22898195,
"ModifyIndex": 22898195,
"Proxy": {
"MeshGateway": {},
"Expose": {}
},
"Connect": {}
},
"Checks": [
{
"Node": "hashicorp-consul-server-2",
"CheckID": "serfHealth",
"Name": "Serf Health Status",
"Status": "passing",
"Notes": "",
"Output": "Agent alive and reachable",
"ServiceID": "",
"ServiceName": "",
"ServiceTags": [],
"Type": "",
"Definition": {
"Interval": "0s",
"Timeout": "0s",
"DeregisterCriticalServiceAfter": "0s",
"HTTP": "",
"Header": null,
"Method": "",
"Body": "",
"TLSServerName": "",
"TLSSkipVerify": false,
"TCP": ""
},
"CreateIndex": 22898191,
"ModifyIndex": 22898191
}
]
}
]
I am using Cypress5.0. I have configured the screenshots folder in cypress.json.
And I am running tests using cypress runner API programmatically.
I am using viewport values as :
config.viewportWidth = 1080;
config.viewportHeight = 1024;
The screenshot is coming, but it is not on the full page. My web page has scrolling, the screenshot is taking only visible area.
Please guide how to take full-page screen.
My Cypress.json
{
"projectId": "yvs41u",
"video": false,
"integrationFolder": "integration-tests/experiences",
"testFiles": "**/*.js",
"fixturesFolder": false,
"pluginsFile": "plugins/index.js",
"supportFile": "support/index.js",
"screenshotsFolder": "build/reports",
"videosFolder": "build/reports",
"videoUploadOnPasses": false,
"trashAssetsBeforeRuns": false,
"reporter": "mochawesome",
"chromeWebSecurity": false,
"reporterOptions": {
"charts": true,
"html": false,
"json": true,
"reportDir": "cypress/reports/mochawesome",
"reportTitle": "Archie Integration Testing Suite",
"reportFilename": "report",
"overwrite": false,
"inline": true,
"inlineAssets": true,
"timestamp": "dd-mmm-yyyy-HH-MM-ss"
}
}
Cypress by default captures only a viewport. In order to screenshot the whole page you need to configure the screenshot first:
Cypress.Screenshot.defaults({ capture: 'fullPage' });
cy.screenshot();
As a result whole page will be captured.
Further read: https://docs.cypress.io/api/cypress-api/screenshot-api.html
I have a cluster of 3 nodes of consul servers. I have registered one service(FooService) with one of the server(Server1). When i check the registered services using http (/v1/agent/services) from the server(Server1) it is showing correctly. But when i try the same with any of other server(ie, Server1 /Server2) its not listing this registered service. This issue is not happening for KV Store. Can someone suggest a fix for this?
consul version : 1.2.1
I have pasted my configuration below
{
"bootstrap_expect": 3,
"client_addr": "0.0.0.0",
"datacenter": "DC1",
"data_dir": "/var/consul",
"domain": "consul",
"enable_script_checks": true,
"dns_config": {
"enable_truncate": true,
"only_passing": true
},
"enable_syslog": true,
"encrypt": "3scwcXQpgNVo1CZuqlSouA==",
"leave_on_terminate": true,
"log_level": "INFO",
"rejoin_after_leave": true,
"server": true,
"start_join": [
"10.0.0.242",
"10.0.0.243",
"10.0.0.244"
],
"ui": true
}
What i understood is , spring boot app should always connect to local consul client. Then this issue will not occur.
I am trying to connect to my cpanel server using sublime text 3.
Server is added successfully. And remote path is also validated successfully.
But when try to Sync Remote->Local it is just not happening.
{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help
// sftp, ftp or ftps
"type": "ftp",
"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": false,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,
"host": "XXXXXX",
"user": "XXXXX",
"password": "XXXXXXX",
"port": "21",
"remote_path": "XXXXXX",
"ignore_regexes": [
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
"sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
],
//"file_permissions": "664",
//"dir_permissions": "775",
//"extra_list_connections": 0,
"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ftp_obey_passive_host": false,
//"ssh_key_file": "~/.ssh/id_rsa",
//"sftp_flags": ["-F", "/path/to/ssh_config"],
//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
//"allow_config_upload": false,
}
And in the console I finally got this:
"Select via quick panel? No".
And the process got terminated by itself.
SFTP has some options for that to put on your sftp-config.json file at the root of your folder :
Set those values like this:
"confirm_downloads":false,
"confirm_sync":false,
"confirm_overwrite_newer":true