サクサク読よめて、アプリ限定げんていの機能きのうも多数たすう!
トップへ戻もどる
衆院しゅういん選せん
qiita.com/Esfahan
Exporterとは Exporterとは監視かんしサーバーのサーバーのメトリクスを収集しゅうしゅう、出力しゅつりょくするツールで、Prometheusがこれを回収かいしゅうする。メトリクスはPrometheusで保存ほぞんされる。 Exporterには、Officialで用意よういされているものや、Third-partyのものなど、監かん視しする対象たいしょうごとに色々いろいろ用意よういされている。詳くわしくは以下いかを参照さんしょう。 https://prometheus.io/docs/instrumenting/exporters/ この記事きじでは、サーバーのUp/Downを監視かんしする仕組しくみを作つくるので、Node exporterを使つかう。 構成こうせい 監視かんしサーバーにPrometheus, Grafana, AlertMamagerの3つをインストールする。 監視かんし対象たいしょうのサーバーにExporterをインストールする。 環境かんきょう prometheus, version 2.27.1 alertmana
!!New!!Rails 5.2.5, 6.0.3.6, 6.1.3.1はmimemagicに依存いぞんしなくなった(3/27追記ついき) mimemagicがMITに戻もどった(3/26追記ついき) 概要がいよう RailsのGPL混入こんにゅう問題もんだいについてまとめました。間違まちがいがあればご指摘してきください。(2021/3/25現在げんざい) https://github.com/rails/rails/issues/41750 ここには3みっつの問題もんだいがある。 Railsが依存いぞんしているmimemagicのライセンスがMITからGPL2.0になった もともとGPLのものが混入こんにゅうしていたのにMITになってしまっていた これにより、Railsのbuildができなくなった Railsが依存いぞんしているmimemagic0.3.5が削除さくじょされたことが原因げんいん Railsの依存いぞんモジュールにGPLのものが混入こんにゅうすることとなった mimemagicを0.3.6以降いこうにすればbu
対象たいしょう者しゃ Gitでrevertした後のち、再度さいどMergeしようと思おもってプルリクを出だしたら差分さぶんがないと言いわれて困こまっている人ひと。 他たの記事きじで「RevertのRevertをする」という言葉ことばを見みて、頭あたまがこんがらがった人ひと。 何なにが起おきたのか developブランチ -> masterブランチ にプルリクを出だしてMerge やっぱりMergeを取とり消けしたいのでRevert revertボタンを押おしてrevertブランチ -> master にrevertプルリクを出だしてMerge 再度さいど develop -> master にプルリクを出だす すると、There isn't anything compare. 差分さぶんがないとなってしまう。。 どうすればよいのか Revertと聞きくと、「戻もどす」というイメージを持もつかもしれないが、実際じっさいは新あらたな修正しゅうせいをMergeしているに過すぎない。つまり上記じょうきの例れいのようにrevertした直後ちょくごは
概要がいよう CentOS7では、デフォルトで/libと/usr/lib以下いかのファイルは、共有きょうゆうライブラリとして含ふくまれています。 それ以外いがいのディレクトリのライブラリを追加ついかしたい場合ばあいは、以下いかのいずれかの方法ほうほうで設定せっていする必要ひつようがあります。 特定とくていのユーザーのみが使つかえるようにする方法ほうほう システム全体ぜんたいで永続えいぞく的てきに使つかいたい場合ばあい OpenSSLのインストール 今回こんかいは例れいとして、OpenSSLを共有きょうゆうライブラリに追加ついかするため、インストールをします。 参考さんこう:CentOS7にOpenSSL1.1.1をインストール 特定とくていのユーザーのみが使つかえるようにする方法ほうほう LD_LIBRARY_PATHは、/etc/ld.so.confで定義ていぎされたパスよりも優先ゆうせんされます。 設定せっていしたいディレクトリ以下いかのライブラリを全すべて参照さんしょうするようになります。
概要がいよう Dockerのログをrsyslogで出力しゅつりょくする方法ほうほう。 関連かんれん 任意にんいのログをlogrotateを使つかって管理かんりする 環境かんきょう CentOS 7.7 rsyslog 8.24.0-41.el7_7.2 Dockerの設定せってい Dockerもしくはdocker-composeで、以下いかのパラメータを指定していし、rsyslogにログが渡わたるようにする。 ログには、This is a example.という文字もじ列れつが出力しゅつりょくされるようにする。 設定せってい内容ないよう Docker docker-compose
概要がいよう Pythonの自作じさくモジュールを作成さくせいした場合ばあい、logをどのように出力しゅつりょくしたらよいのか、サンプルを作つくりました。 処理しょり内容ないよう sample.pyというモジュールを、main.pyから呼よび出だします。sample.py内ないでlog出力しゅつりょくの処理しょりを書かきますが、main.pyでroot loggerが作つくられていないと、モジュール内ないのloggerは何なにも出力しゅつりょくしないという挙動きょどうになります。 ハンズオン モジュールを作成さくせい モジュール内ないを作成さくせいします。log出力しゅつりょくの処理しょりを書かきます。 # -*- coding:utf-8 -*- from logging import getLogger, DEBUG, NullHandler class Sample: def __init__(self): self._logger = getLogger(__name__) self._logger.addHandler(NullHan
概要がいよう 表題ひょうだいのとおり。やリかたよく忘わすれるので備忘録びぼうろくも兼かねて。 対象たいしょう者しゃ push済ずみのcommit変かえちゃダメとかそういうのいいから今いますぐpush済ずみのcommitをsqushでまとめたい人ひと。 rebaseコマンドを使つかう rebaseコマンド HEADから遡さかのぼって、まとめたいcommit数すう + 1を指定していする。 以下いかは、HEADから遡さかのぼって4commitをまとめる例れい。 (HEADも含ふくめて4commit) まとめる対象たいしょうcommitを選択せんたく すると以下いかのような画面がめんが開ひらく。 This is a just commit以外いがいのpickをsもしくはsquashに書かき換かえて、保存ほぞんする。 なぜ1行ぎょう目めは書かき換かえないのかというと、こうすることで、This is a just commitに他たのcommitが集約しゅうやくされるからだ。そのために、4commitまとめるのに、HEAD~5を指定していしたのだ。 ちなみに全部ぜんぶsにすると、Cann
概要がいよう DockerでMySQLコンテナを立たて、ホストOS、または外部がいぶサーバーから接続せつぞくする方法ほうほう。 docker runの場合ばあい $ sudo docker run \ --rm \ -v $(pwd)/db/mysql_init:/docker-entrypoint-initdb.d \ -v $(pwd)/db/mysql_data:/var/lib/mysql \ --name mysql \ -e MYSQL_ROOT_PASSWORD=your_password \ --hostname my-mysql \ -e BIND-ADDRESS=0.0.0.0 \ -p 3306:3306 \ -itd mysql:5.7 version: '3.1' services: db: image: mysql:5.7 restart: always hostname: my-mysql env
#-*- coding:utf-8 -*- import getpass from fabric import Connection, Config from invoke import task @task def sample(c): Config.user = 'username' hostname = 'example.com' sudo_pass = getpass.getpass("What's your sudo password?") config = Config(overrides={'sudo': {'password': sudo_pass}}) c = Connection(hostname, config=config) c.run('hostname')
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
#!/bin/bash # helpを作成さくせい function usage { cat <<EOM Usage: $(basename "$0") [OPTION]... -h Display help -a VALUE A explanation for arg called a -b VALUE A explanation for arg called b -c VALUE A explanation for arg called c -d VALUE A explanation for arg called d EOM exit 2 } # 引数ひきすう別べつの処理しょり定義ていぎ while getopts ":a:b:c:d:h" optKey; do case "$optKey" in a) echo "-a = ${OPTARG}" ;; b) echo "-b = ${OPTARG}" ;; c)
概要がいよう AWS Batchで使用しようするためのdockerイメージを、AWS ECRに登録とうろくする手順てじゅんです。 関連かんれん記事きじ AWS BatchをCloudformationで作つくってみた Dockerのインストール こちらの記事きじを参考さんこうに、Dockerを実行じっこうする環境かんきょうを用意よういしてください。 docker(docker-engine), docker-composeのインストール docker imageの作成さくせい Dockerfileの作成さくせい サンプルとして、以下いかのようなpythonの実行じっこう環境かんきょうを構築こうちくするDockerfileを作成さくせいします。 FROM centos:centos7 # Install dependencies RUN yum -y update RUN yum -y install \ git \ zlib \ tk-devel \ tcl-devel \ ncurses-devel \ gdbm-dev
概要がいよう ngrokとは、localhostで動うごいているサーバーを、LANの外そとからアクセスできるようにできるツールです。 vagrantなどのローカル環境かんきょうを一時いちじ的てきに外部がいぶに公開こうかいできるため、webhookなどの受信じゅしんが必要ひつようなシステムでも、ローカルで動うごかすことが可能かのうとなります。 windows, mac両りょう環境かんきょうでのインストール手順てじゅんです。 環境かんきょう macOS Sierra 10.12.3 / Windows 7, 10 ngrok 2.2.4 Vagrant 1.9.0 インストール windowsの場合ばあい ここからwindows版ばんダウンロード https://ngrok.com/ ダウンロードしたngrok.zipを任意にんいのフォルダに解凍かいとう macの場合ばあい ホストOSで以下いかを実行じっこうしてインストールする。 ここでmac版ばんのダウンロードURLを調しらべて、CURLでダウンロード https://ngrok.com/
概要がいよう Rails5から、productionモードでは、db:dropなどのDBを破壊はかいする系けいのコマンド実行じっこうを防止ぼうしする機能きのうが追加ついかされた。 下記かきはproductionで rake db:drop する時ときの手順てじゅん。 ar_internal_metadataテーブルのenvironmentをproductionにする まずは、developmentやstagingなどの違ちがう環境かんきょうのDBをdumpして、productionのDBに入いれたときなどに起おこるエラーの対処たいしょ法ほうについてです。 productionでrake db:dropする方法ほうほうのみ知しりたい方ほうは、次つぎの項目こうもくへ進すすんで下ください productionになっていないとこんなエラーが出でる $ RAILS_ENV=production bundle exec rake db:drop rake aborted! ActiveRecord::EnvironmentM
概要がいよう Serverless Frameworkとは、Lambda、API Gateway、DynamoDBなどを作成さくせい、管理かんり、デプロイできるツールです。 Frameworkと付ついていますが、ツールです。 この記事きじでは、python3でLambda関数かんすうを作成さくせいします。 環境かんきょう CentOS 7.2 serverless 1.23.0 node v6.11.3 npm 3.10.10 OpenSSL 1.0.2k-fips 26 Jan 2017 npmのインストール 以下いかの記事きじを参照さんしょう npmのインストール手順てじゅん Serverless Frameworkのインストール slsというディレクトリを作成さくせいし、そこで作業さぎょうを行おこないます。
CentOS 7.2 kernel 4.12.4-1.el7.elrepo.x86_64 fly 3.3.4 docker 17.05.0-ce docker-compose version 1.15.0 必要ひつよう要件ようけん 以下いかにあるように、Concourse CIを使つかうためには、kernelのバージョンは、v3.19以上いじょうである必要ひつようがあります。 uname -r コマンドで、kernelのバージョンを確認かくにんしてください。 For Linux you'll need kernel v3.19 or later, with user namespace support enabled. Windows and Darwin don't really need anything special. もし、バージョンが低ひくい場合ばあいは、以下いかを参考さんこうにして、アップデートしてください。 VagrantのCentOS7のカ
事象じしょうAが起おこるという条件じょうけんのもと、i種類しゅるいの事象じしょうBが起おこる場合ばあいの条件じょうけん付づけ確かく率りつは以下いかで求もとめられます。 K種類しゅるいの事象じしょうBは、B_1, B_2, B_3・・・B_i というように定義ていぎし、お互たがいは排反はいはんとします。 事象じしょうAが起おこるという条件じょうけんのもと事象じしょうBiが起おこる条件じょうけん付づけ確かく率りつは、以下いかの式しきで求もとめられます。
Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up
目次もくじ プログラマーのための統計とうけい学がく - 目次もくじ 概要がいよう 統計とうけい学がくで使用しようする、度数どすう分布ぶんぷとヒストグラムについてです。 pythonでヒストグラムを作成さくせいもします。 度数どすう分布ぶんぷとは 収集しゅうしゅうしたデータをいくつかの階級かいきゅう(区間くかん)に分わけたときの、それぞれの階級かいきゅうに所属しょぞくするデータの分布ぶんぷ状じょう況きょうのこと 引用いんよう元もと:コトバンク らしいです。言葉ことばの定義ていぎだけでは難むずかしいので、実際じっさいに例れいを挙あげて説明せつめいしていきます。 度数どすう分布ぶんぷ表ひょう ある組織そしきの年齢ねんれいの分布ぶんぷを調しらべるとします。 組織そしきの人数にんずうは全部ぜんぶで100人にんいるとします。 調査ちょうさした結果けっか、下記かきのような結果けっかになりました。 非常ひじょうに見みづらいですが、100人にん全員ぜんいん分ぶんの年齢ねんれいをlistにしています。 ages = [23, 22, 23, 22, 24, 20, 22, 24, 29, 28, 25, 25, 26, 27, 28, 27, 25, 25, 27, 25, 25, 32, 32, 32, 33, 33, 32
概要がいよう Kubernetesの環境かんきょう構築こうちく手順てじゅんです。 Kubernetesとは Kubernetesとは、Dockerなどの仮想かそうコンテナのクラスタリングを行おこなうためのサービスです。 詳くわしくはこちらを参照さんしょうしてください。 Docker(コンテナ型がた仮想かそう化か)と Kubernetes についての簡単かんたんな紹介しょうかい Kubernetesとは何なにかを分わかりやすく紹介しょうかいする「よい子このためのKubernetes絵本えほん」動画どうがが公開こうかい この記事きじはmasterの構築こうちく手順てじゅんです。 nodeの作成さくせい手順てじゅんは以下いかになります。 Kubernetesでクラスタ環境かんきょう構築こうちく手順てじゅん(2) - nodeの作成さくせい 目次もくじ Kubernetesハンズオン目次もくじ 事前じぜん準備じゅんび まず、master用ように1台だい、node用ように最低さいてい1台だい、サーバーを用意よういする必要ひつようがあります。 今回こんかいは、vagrantを2つ、master, node用ように用意よういをして構築こうちくをしました。 このページで、手順てじゅんで特とくに指定していがない
概要がいよう DB定義ていぎ書しょを自動じどうで作つくってくれる、「A5:SQL Mk-2」というツールの使つかい方かたです。 出力しゅつりょく方式ほうしきは、ExcelかHTMLのどちらかを選択せんたくできます。 MySQL、PostgreSQL、Oracleなど、さまざまな環境かんきょうで利用りようできます。 また、SSHトンネルでDBに接続せつぞくすることもできます。 非常ひじょうに便利べんりで簡単かんたんに使つかえるツールです。 動作どうさ環境かんきょう Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 Windows Server 2003, Windows Server 2008, Windows Server 2012 ダウンロード http://a5m2.mmatsubara.com/ ここからダウンロードします。 ページ下部かぶから、ご自分じぶんの環境かんきょうにあったものをダウンロードしてください。 ZIPファイルがダウン
次つぎのページ
このページを最初さいしょにブックマークしてみませんか?
『qiita.com』の新着しんちゃくエントリーを見みる
j次つぎのブックマーク
k前まえのブックマーク
lあとで読よむ
eコメント一覧いちらんを開ひらく
oページを開ひらく