# 202111 ## [None](https://twitter.com/jp7fkf/status/1454482405020954628) ## [esa - 自律的なチームのための情報共有サービス](https://esa.io/) ## [KubeEdge](https://kubeedge.io/en/) - [GitHub - kubeedge/kubeedge: Kubernetes Native Edge Computing Framework (project under CNCF)](https://github.com/kubeedge/kubeedge) ## [Deploy code faster: with CI/CD and Kubernetes](https://cloud.google.com/kubernetes-engine/kubernetes-comic) ## [xargsでzshの自作シェル関数を使う - Qiita](https://qiita.com/stanaka2/items/113b5aef29e982c39800) ## [ArangoDB, the multi-model database for graph and beyond](https://www.arangodb.com/) - [GitHub - arangodb/arangodb: 🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.](https://github.com/arangodb/arangodb) ## [None](https://www.monotaro.com/g/04017286/) ## [知ってるようで知らない YAML のご紹介 - NTT Communications Engineers' Blog](https://engineers.ntt.com/entry/2021/09/10/100708) ## [Sample diagrams: packetdiag — blockdiag 1.0 documentation](http://blockdiag.com/en/nwdiag/packetdiag-examples.html) ## [WaveDrom Editor](https://wavedrom.com/editor.html) ## [GitHub - sathlan/dformat: A Program for Typesetting Data Formats.](https://github.com/sathlan/dformat) ## [Protocol | An ASCII Header Generator for Network Protocols](https://www.luismg.com/protocol/) - [GitHub - luismartingarcia/protocol: An ASCII Header Generator for Network Protocols](https://github.com/luismartingarcia/protocol) ## [ASCIIFlow](https://asciiflow.com/#/) - [Sample diagrams: nwdiag — blockdiag 1.0 documentation](http://blockdiag.com/en/nwdiag/nwdiag-examples.html) - [nwdiag/packetdiag.1 at master · blockdiag/nwdiag · GitHub](https://github.com/blockdiag/nwdiag/blob/master/packetdiag.1) - [GitHub - luismartingarcia/protocol: An ASCII Header Generator for Network Protocols](https://github.com/luismartingarcia/protocol) ## `this cluster currently has [1000]/[1000] maximum shards open` on logstash ``` [2021-11-26T15:47:31,250][WARN ][logstash.outputs.elasticsearch][elastiflow][0dba80b2c13f51c2e9dbdff0c01a879811b7fafc6ee06abbd3938ee05525180f] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"elastiflow-4.0.1-2021.11.26", :routing=>nil, :_type=>"_doc"}, #], :response=>{"index"=>{"_index"=>"elastiflow-4.0.1-2021.11.26", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [6] total shards, but this cluster currently has [1000]/[1000] maximum shards open;"}}}} ``` - [Quantitative Cluster Sizing | Elastic](https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing) - index management->index templateから number_of_shardsを下げる ``` { "index": { "lifecycle": { "name": "elastiflow" }, "codec": "best_compression", "mapping": { "total_fields": { "limit": "5000" } }, "refresh_interval": "10s", "number_of_shards": "1", "number_of_replicas": "1" } } ``` ## rollover aliasの設定 - 怒られる ``` Index lifecycle error illegal_argument_exception: setting [index.lifecycle.rollover_alias] for index [elastiflow-4.0.1-2021.07.23] is empty or not defined ``` ``` java.lang.IllegalArgumentException: setting [index.lifecycle.rollover_alias] for index [elastiflow-4.0.1-2021.07.23] is empty or not defined at org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:75) at org.elasticsearch.xpack.ilm.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:175) at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:335) at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggered(IndexLifecycleService.java:273) at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:184) at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:217)n at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832) ``` - 原因はrollover_aliasを設定していないのが原因.rolloverしたときにindexのaliasをどうするか,らしいので,indexのなまえをfollowする感じにしておくと同じ感覚で検索できるのでよさそうとのこと. ``` { "index": { "lifecycle": { "name": "elastiflow", "rollover_alias": "elastiflow" }, "codec": "best_compression", "mapping": { "total_fields": { "limit": "5000" } }, "refresh_interval": "10s", "number_of_shards": "1", "number_of_replicas": "1" } } ``` - bootstrapするindexのaliasを `is_write_index` を `true` にしてつける ``` curl -X PUT "localhost:9200/elastiflow-000001?pretty" -H 'Content-Type: application/json' -d' { "aliases": { "elastiflow": { "is_write_index": true } } }' ``` - References - [Index LifeCycle Managementを体感する - 今日もショートドリップをマグで。](https://tsgkdt.hatenablog.jp/entry/2019/02/10/233656) - [Tutorial: Automate rollover with ILM | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html#ilm-gs-apply-policy) ## mutation testing - [mutation testingについて考えた - Qiita](https://qiita.com/engineer/items/e0a9ae73d8f2b3b37cf3) - すでにテストが存在するコードに対してtestがfailするようなロジック変更を行い,実際に意図したとおりにtestがfailするかを確かめるもの. - 自動でやるtest frameworkも存在する. - logicをかえてtestを回しまくらないといけないので,それなりに時間的につらいものはありそう. ## [The A to Zabbix of Trapping & Polling – netquirks](https://netquirks.co.uk/2018/06/19/the-a-to-zabbix-of-trapping-polling/) ## [GitHub - Exa-Networks/exabgp: The BGP swiss army knife of networking](https://github.com/Exa-Networks/exabgp) ## [rfc4665](https://datatracker.ietf.org/doc/html/rfc4665) ## [rfc5440](https://datatracker.ietf.org/doc/html/rfc5440) ## alpineなdockerでcronする ``` FROM alpine:3.9 RUN apk --update add tzdata && \ cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \ apk del tzdata && \ rm -rf /var/cache/apk/* COPY crontab /var/spool/cron/crontabs/root # cronで呼びたいbinとかをを適宜準備する # COPY test /usr/local/bin/test # cronのdaemonを起動(log level=1, foreground) CMD crond -l 1 -f ``` - ref: [[docker]alpineでcronスクリプトを実行する | akamist blog](https://akamist.com/blog/archives/3565) ## 正規表現の `[\s\S]` は `.` と違って改行文字にもマッチする ## [GitHub - monochromegane/go_design_pattern: Design patterns in Golang.](https://github.com/monochromegane/go_design_pattern) ## [Pythonはどうやって動くのか](https://kaityo256.github.io/python_zero/howtowork/index.html) ## [Einstein - Annalen der Physik](https://einstein-annalen.mpiwg-berlin.mpg.de/annalen/alphabetical) - アインシュタインの原論文 ## [The Linux Kernel](http://archive.linux.or.jp/JF/JFdocs/The-Linux-Kernel.html#toc9) ## [Graphviz](https://graphviz.org/) ## [仙石浩明の日記: ssh-agent & ForwardAgent を、より安全にしてみる](https://www.gcd.org/blog/2007/07/123/) ## [Prophet | Forecasting at scale.](https://facebook.github.io/prophet/) ## [【Git】コンフリクト(conflict)が発生しても大丈夫な対処法まとめ 〜自分で発生させて解決する手順〜 - Qiita](https://qiita.com/shizen-shin/items/391aac7b9febaf11bde6) ## [Win-Test](http://www.win-test.com/)