sed -rne '/Wed Aug 19 21:34:00/,/Wed Aug 19 21:40:00/ p' logfile.log
The timestamp in the log file in this case was in the following format:
Wed Aug 19 21:39:59 2020
sed -rne '/Wed Aug 19 21:34:00/,/Wed Aug 19 21:40:00/ p' logfile.log
The timestamp in the log file in this case was in the following format:
Wed Aug 19 21:39:59 2020
keytool -list -v -keystore keystore.ts -storepass PASSWORD
In the main server block (e.g. /etc/nginx/nginx.conf) add the following:
if ($http_user_agent ~* (AgentName) ) {
return 403;
}
Test nginx config and restart:
nginx -t
service nginx restart
To test the agent gets blocked:
curl -I -H 'User-agent: AgentName' localhost/bla
HTTP/1.1 403 Forbidden
It is worth checking the replication factor before modifying:
./path/to/kafka/bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic test-topic
Topic:test-topic PartitionCount:2 ReplicationFactor:1 Configs:
Topic: demo-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Topic: demo-topic Partition: 1 Leader: 1 Replicas: 1 Isr: 1
It can be seen here that the replication factor is 1.
To update to a replication factor of e.g. 3 firstly create a json file with a new reassignment plan. Call it e.g. reassignment-plan.json:
List all registered VM ID’s:
vim-cmd vmsvc/getallvms
Power off vm:
vim-cmd vmsvc/power.off VMID
Check vm power status:
vim-cmd vmsvc/power.getstate VMID
Recent Comments