[{"categories":["System"],"collections":null,"content":"Docker compose deploys complete monitoring system components with one click","date":"2023-12-12","objectID":"/theme-document-docker-conpose-emqx_monitor/","tags":["Docker","System"],"title":"The best deployment solution for MQTT Broker performance monitoring - EMQX (2)","uri":"/theme-document-docker-conpose-emqx_monitor/"},{"categories":["System"],"collections":null,"content":"Preface\rInfo\rBefore starting to read this article, it is recommended to browse the previous article High-Performance Internet of Things MQTT Broker - EMQX to learn about EMQX related information\rAfter successfully establishing EMQX as the brain of MQTT, it is difficult to estimate whether the server can withstand the corresponding resource consumption. By monitoring changes in performance, a chart can provide timely feedback on the current situation. I believe it will allow us to further cope with the risks that will be expected in the future. But this alone is not as powerful as the title describes. We need an installation method that is different from the past installation method of installing components one by one and then concatenating data. ~~~Let yourself get off work earlier😂~~~ And this will bring up today\u0026rsquo;s protagonist Docker compose!!, which is more advanced than Docker, but can deploy multiple Dockers at one time to start all components with one click. before the start\rBefore officially entering our topic today, the tools you will need to prepare are as follows: Virtual Machine (Centos, Ubuntu) *Docker Docker Compose *git Tip\rFor Docker installation, you can refer to official link to choose the appropriate operating system. git installation 1 sudo apt install git #Ubuntu 1 sudo yum install git #Centos Preliminary steps\rGrab this file through Git and enter the folder 1 2 git clone https://github.com/as183789043/EMQX-Single_Node_Monitor.git cd EMQX-Single_Node_Monitor Add a new file and modify the permissions (Theoretically, Docker compsoe can be created by yourself, but the author will have permission problems when implementing it, so it is created manually) 1 2 mkdir emqx1_data chmod 777 emqx1_data 2024/03/03Update Exclude manual permission modification operations\rBy adding a busybox container in the file docker-compose.yaml, instead of manually setting permissions in the past\rThen change the startup sequence of the original emqx container to wait for the completion of the busybox task.\rStart the file 1 docker compose up -d At this point, all monitoring components have been successfully started, and we enter the next stage. File content description\rWhat exactly is done with the pulled files and the detailed explanation of the program code will be explained in this chapter. docker-compose.yaml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 version: \u0026#39;3\u0026#39; services: busybox: image: busybox:latest container_name: bustybox volumes: - ./emqx1_data/:/root/emqx1_data/ command: [ \u0026#34;chown\u0026#34;, \u0026#34;-R\u0026#34;,\u0026#34;1000:1000\u0026#34; ,\u0026#34;root/emqx1_data\u0026#34;] networks: - emqx-bridge emqx1: image: emqx:5.3.2 container_name: emqx1 healthcheck: test: [\u0026#34;CMD\u0026#34;, \u0026#34;/opt/emqx/bin/emqx ctl\u0026#34;, \u0026#34;status\u0026#34;] interval: 30s timeout: 60s retries: 5 ports: - 1883:1883 - 8083:8083 - 8084:8084 - 8883:8883 - 18083:18083 volumes: - ./emqx1_data/:/opt/emqx/data networks: emqx-bridge: aliases: - node1.emqx.io depends_on: \u0026#39;busybox\u0026#39;: condition: service_completed_successfully prometheus: image: prom/prometheus container_name: prometheus volumes: - ./prometheus.yaml:/etc/prometheus/prometheus.yaml command: --config.file=/etc/prometheus/prometheus.yaml ports: - 9090:9090 networks: - emqx-bridge pushgateway: image: prom/pushgateway container_name: pushgateway ports: - 9091:9091 networks: - emqx-bridge node-exporter: image: prom/node-exporter container_name: node-exporter ports: - 9100:9100 networks: - emqx-bridge grafana: image: grafana/grafana-oss container_name: grafana ports: - 3000:3000 networks: - emqx-bridge networks: emqx-bridge: driver: bridge docker-compose.yaml 说明\rversion: '3' is the current fixed version of docker compose and can be adjusted according to the official website release\rservices: service name of each component (emqx1, prometheus)\rcont","date":"2023-12-12","heading":"","objectID":"/theme-document-docker-conpose-emqx_monitor/:0:0","tags":["Docker","System"],"title":"The best deployment solution for MQTT Broker performance monitoring - EMQX (2)","uri":"/theme-document-docker-conpose-emqx_monitor/#"},{"categories":["System"],"collections":null,"content":"EMQX interface navigation and simple MQTT communication implementation","date":"2023-11-27","objectID":"/theme-document-docker-emqx/","tags":["System","IoT","Docker"],"title":"High-performance IoT MQTT Broker - EMQX","uri":"/theme-document-docker-emqx/"},{"categories":["System"],"collections":null,"content":"Preface\rWhen it comes to the MQTT protocol, the first scenario that most people think of is communication in the Internet of Things. The reason is that MQTT is simpler than the HTTP protocol used on web pages, and the packet messages transmitted are smaller. Ideal for sending and receiving data under limited bandwidth and computing resources. As for what the specific MQTT protocol is doing, let us look at the picture below to explain. agreement description\rFrom the picture, we can see that there is a place similar to the MQTT brain in the middle, generally called the MQTT Broker, where the message publishing (Publish) on the left is transferred to the Subscriber (Subscribe) on the right. This completes a message delivery. Question: So how do we confirm that publishing and communication can be delivered correctly without getting other noise? From the picture, you can see that there are some path-like things where each project is connected. This is the so-called topic. Only when publishing and subscribing to the same topic can one receive messages. If you want to obtain multiple topics, you can set # in the path to read multiple topics, but please note that / represents layering and there is no / at the beginning of the first layer. Differences from similar product Mosquito\rThe veteran Mosquito must be familiar to enthusiasts who study IoT due to its simple installation method. Allows users to quickly experience how to set up each component of the MQTT protocol. But in comparison, there are several reasons why I think using EMQX is a good choice. Can handle more messaging in a short time There is a direct GUI screen for browsing and additional settings Internally, data can be dumped out of Prometheus (sequential database) for storage If you need to use it on microservice architecture, corresponding installation methods are also provided. EMQX vs Mosquitto official website detailed description before the start\rBefore officially entering our topic today, you will need to use the following two tools to demonstrate Docker MQTTX Info\rIf you lack a Docker environment, you can read this article Private environment website monitoring system construction-Uptime-kuma!!\rDocker starts EMQX\rAfter installing Docker, enter the following command 1 2 3 4 5 6 7 docker run -d --name emqx \\ -p 1883:1883 -p 8083:8083 \\ -p 8084:8084 -p 8883:8883 \\ -p 18083:18083 \\ -v $PWD/data:/opt/emqx/data \\ -v $PWD/log:/opt/emqx/log \\ emqx/emqx:5.3.1 Parameter description\r-d: background running -p: port mapping (the former is the port on the computer and the latter is the port inside the container) -v: Directory mounting for permanent storage ($PWD = current directory of the computer) 1883: MQTT standard communication port 8083: WebSocket 8084: WebSocket with SSL 8883: MQTT with SSL 18083: Web UI If there is no EMQX image in the local environment, Docker run will automatically go to Docker Hub to download it. When the instructions on the right are completed, enter http://lcoalhost:18083 to enter the Login Page Default login information\rUsername:admin Password: public The first time you log in to the system, you will be prompted to change your password. Function exploration\rSystem information overview\rAfter entering the homepage, the default is Simplified Chinese. You can select the language and black/white mode through the gear in the upper right corner. The content in the red box shows an overview of system information, such as: system resources, number of MQTT subscriptions, and how many Topics there are currently. Create a User\rCreate user database You can see that the user database has been created. Click User to enter the Username to be used after adding it. There is no account complexity limit for new users At this point, the necessary information for the connection has been established. We can start to use EMQX through the connection. MQTT connection test\rClick New Connection and enter the following information HOST: MQTT + connection IP (use localhost for ","date":"2023-11-27","heading":"","objectID":"/theme-document-docker-emqx/:0:0","tags":["System","IoT","Docker"],"title":"High-performance IoT MQTT Broker - EMQX","uri":"/theme-document-docker-emqx/#"},{"categories":["System"],"collections":null,"content":"UptimeRobot step-by-step from registration to configuration","date":"2023-11-20","objectID":"/theme-document-sass-uptime-robot/","tags":["Sass","System","App"],"title":"Free online web monitoring service - UptimeRobot","uri":"/theme-document-sass-uptime-robot/"},{"categories":["System"],"collections":null,"content":"Preface\rThis article is a continuation of the previous one Private environment website monitoring system construction - Uptime-kuma The following content The difference between the two is that if the service that needs to be monitored can already be connected through the browser and you do not plan to set up a local monitoring system yourself, UptimeRobot will come in handy!! Free version restrictions\rThe picture below is taken from the cover of the official website. Under free usage conditions, 50 monitoring targets can be set and a check will be performed every 5 minutes. Registration steps\rOfficial website registration link Enter registration information Go to your mailbox to activate your account Add monitoring target\rWarning\rIn the subsequent settings, you will see PAID, which are benefits that need to be upgraded to enjoy.\rThe mailbox jumps to the homepage of UptimeRobot. You can see that there is a mobile version available for download (~~~No need to carry a computer with you anytime and anywhere 😂~~~) Then click +Add New Monitor Select monitoring type Let’s take the blog’s survival status as an example for setting up (please expand the info block for detailed setting instructions) Info\rURL(IP) IP exposed on the public network that can be connected Monitoring Interval: The checking interval can be greater than 5 minutes but not less (needs to be upgraded) Monitor Timeout: Check how long it has been since there was no response to determine if it is abnormal Tests and results\rAfter the setting is completed, you can check whether the setting is correct through testing. Go back to the mailbox to check. The service is normal, but the time zone is abnormal. Change the time zone setting (after testing, the email time zone is normal and the dashboard is still UTC+0) in conclusion\rCompared with the self-built service version, it lacks some common functions, such as the following No SSL certificate expiry detection The default email of the notification system requires additional settings and cannot be supported by Line commonly used in Taiwan. But since it is free, some missing features are within reasonable limits. To use it, you need to choose whether to use this tool according to the scene area! In addition, the difference in benefits before and after the upgrade is attached for readers’ reference. UptimeRobot-Pricing Additional screening on the same scene, mobile APP screen browsing\rAfter downloading the mobile APP, you can check the status of the website through the time and time on your mobile phone, and there will be an additional mobile notification option (needs to be opened in Alert) Let me end this article by showing you the mobile version. ","date":"2023-11-20","heading":"","objectID":"/theme-document-sass-uptime-robot/:0:0","tags":["Sass","System","App"],"title":"Free online web monitoring service - UptimeRobot","uri":"/theme-document-sass-uptime-robot/#"},{"categories":["System"],"collections":null,"content":"Quickly build website monitoring tools and alarm systems through Docker","date":"2023-11-12","objectID":"/theme-document-docker-uptime_kuma/","tags":["Docker","Line","System"],"title":"Construction of private environment website monitoring system - Uptime-kuma","uri":"/theme-document-docker-uptime_kuma/"},{"categories":["System"],"collections":null,"content":"Why you need website monitoring tools\rIn a general environment where a website is deployed, the most important thing is to know whether the services provided by the website are down or whether the certificate has expired. In the past, these things were monitored by writing scripts or programs, which was extremely troublesome for users without technical background. Especially after the monitoring is written, it also needs to be notified when something goes wrong, which undoubtedly makes reasonable monitoring more troublesome. Adhering to the idea that for complicated things, you should first find ready-made tools online instead of relying on yourself. So there is today’s protagonist Uptime-kuma Info\rIf you want to experience the online interface and perform basic settings before installation, you can refer to the link below. Demo website link 10 minutes available version Then let’s start installing it in our own environment to experience the effect of unlimited use.\rPre-installation requirements\rAn environment with Docker is required (installation method is as follows) Windows Run PowerShell or Windows Command Prompt as administrator to install WSL and then restart your computer 1 wsl --install Download Docker Desktop Ubuntu copy and paste in Terminal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 sudo apt-get update sudo apt-get install \\ ca-certificates\\ curl \\ gnupg\\ lsb-release sudo mkdir -m 0755 -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo \\ \u0026#34;deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \\ $(lsb_release -cs) stable\u0026#34; | sudo tee /etc/apt/sources.list.d/docker.list \u0026gt; /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y sudo gpasswd -a $USER docker newgrp docker Uptime-kuma installation\rEnter Power Shell/Terminal and enter the following command 1 docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1 Instruction note\r-d will make the container run in the background -restart starts docker and automatically starts monitoring -p The internal network port corresponds to the external (host) port number -v data storage location Add uptime-kuma folder to the current directory of the machine to synchronize the app/data directory of the container Connection UI interface\rOpen browser input\rIf you want to experience the online interface and perform basic settings before installation, you can refer to the link below. 1 http://localhost:3001 If Ubuntu does not have a desktop installed, you can refer to the following methods 1 2 ufw allow 3001 #Open external firewall ip -a #Find the IP of the current host and then use an external connection to enter UI settings\rEntering the UI requires setting an account and password. Start with the simplest web page monitoring Enter the URL to be monitored If you have advanced needs, you can also check the box to check the remaining days of the voucher. Alarm system Line Notify settings\rCan set more than one notification When you see that a token is required and there are instructions below on how to get it, click on the URL in the red box below. Click on the upper right corner You can choose to log in with an account or qrcode You can choose how notification is sent. It can be directed to individuals or in groups. Test first to see the effect on 1-on-1 basis. After logging in, scroll to the bottom and click Issue Token Just get the token and fill it back into the web page Simulation monitoring failure example\rThe configuration file of Ping is as follows. The type of ping and simulation of a non-existent URL are combined with notification settings. result\rIt can be seen that the website\u0026rsquo;s response time is 0.2 seconds on average, the response rate is normal and the certificate expires in 58 days. If it fa","date":"2023-11-12","heading":"","objectID":"/theme-document-docker-uptime_kuma/:0:0","tags":["Docker","Line","System"],"title":"Construction of private environment website monitoring system - Uptime-kuma","uri":"/theme-document-docker-uptime_kuma/#"},{"categories":[],"collections":null,"content":"About the author\r💊💻 After graduating from the Department of Biology, I unexpectedly switched to the information industry. 🚩 Determined to become a software engineer who can optimize architecture and develop independently. 🚀 Focus on learning new technologies and implementing them to solve practical problems. ❤️ Loves food, watching dramas, and philosophy. About the blog\rMotivation for establishing a blog: The author\u0026rsquo;s work is related to the computer field. While continuing to learn new technologies, he is also committed to consolidating existing knowledge to cope with increasingly complex technologies. challenge. By writing articles, I record my growth process, and hope to provide useful content for every user who visits the website. It would be a great honor for me if my article can be helpful to you! Exeprience\r2025.03-2026.04\rData Enginner\r公司: WebComm Technology 工作地點: Taipei - Songshan\r2024.05-2026.05\rMaster of Computer Science and Technology\rUniversity: Arizon State University Workplace: Online\r2022.11-2025.02\rAWS Cloud Engineer\rCompany: SYSTEX Workplace: Taiepi - Neihu\r2022.8-2022.9\rData Engineer\rCompany: Glory Information Workplace: Taipei - Songshan\r2022.2-2022.8\rData Engineer (Intern)\rCompany: Foresii Workplace: Taipei - Daan\r2017.9-2021.6\rBio-Engineering\rUniversity: Tatung Workplace: Taipei - Jhongshan\r","date":"2023-11-03","heading":"","objectID":"/about/:0:0","tags":[],"title":"About","uri":"/about/#"}]