I have a Macbook pro with this symptom: it’s not powered on , tried to hold the power button for long time , still nothing happen. I tried with and without power adaptor, result is still the same.I open the laptop and disconnect the battery, connect the power adapter , it turns on and working perfectly.Is the battery bad? i connect the battery back, it’s working fine. But then i shut it down, i can’t turn it on back.what is the issue? it’s because the power key is dead. The power key is a part of keyboard system. Solution? there are 3 replace the keyboard:Read More →

High CPU usage is a common issue in every system, finding the root cause is not always easy. What the sign of a high CPU usage? I normally look at load avg , if the load avg is higher than the number of your CPU cores , then your system is overloaded. I have 8 cores, so my number is good. Sometimes we our load avg does not reach to the cpu cores , but we still see some application is slow, it’s because there is a process occupies the one single CPU core. My next step will be check the CPU usage per processRead More →

We tried to add Application Insights from Visual Studio Menu, the system said that version 2.15 installed, but we don’t see ApplicationInsights.config created.It turned out that our dotnet project is 4.5 while AppInsights version 2.15 requires dotnet must be 4.5.2 or higher. Visual Studio should show an error for this, but it doesnt. Solutions ? there are 2 ways you can fix it.1) keep your current dotnet version and downgrade your appinsights version to 2.14 2) upgrade your dotnet version to the latest and also update appinsights to the latest as well. How to update AppInsights versiion , right click on the project and selectRead More →

Sometimes we have a function running too long more than we expect, we want to kill it after a certain time. For example, we have a function connecting to a remote share, the function we use to connect does not provide a timeout or we can’t change its timeout.Our solution is to build a timeout function to kill the function if it runs too long. I found this good and simple code: How do i use it?Read More →

We have a monitoring system to check network devices, sometimes we got an alert saying the remote device is down. We check the remote device and it’s working fine. To ensure that our monitoring working properly, we create an external script to monitor system, then we want to compare the result between 2 systems. I finally come with this script (ping.sh) , it will continuously ping the remote server, if it’s down, it will write a log. I want to run this script in background so i run it like this: The script is just the basic only, you can do a lot of customizationRead More →

I have this scenario, i would like to monitor all our Microsoft sql databases in our setup using Telegraf. I dont want to install telegraf agent in every server, i want to collect SQL database metrics remotely from a single location. What is the challenge? If you use the default setup, telegraf will not tag the remote hostname in its metric, it will use our telegraf hostname. That means you can’t tell the difference between databases . Solution ? i found out that we can add additional tags in the configure[inputs.sqlserver.tags] If you use this configure, you will see this tag “sql_db_remote_host” in the metrics.Read More →

:~$ route -n Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1 192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth1Read More →

InfluxDB not only support metrics, it also can store your syslog. I have played around with metrics, now I’d like to send my log to InfluxDB. Here is how I did.1. Turn your telegraph as a syslog server listener. I chose to use UDP instead of TCP. 6514 is the UDP port 2. On the client side, We need to tell rsyslog to send the log to my Telegraf. Check the config below, you need to specify RSYSLOG_SyslogProtocol23Format. , “@” is for UDP , “@@” is for TCP The next step is to download a Syslog dashboard from Grafana and see how it worksRead More →

I started to build InfluxDB for a high availability InfluxDB architecture. I will share all my experience with the InfluxDB Relay in this post. This is based on InfluxDB 1.X AuthenticationInfluxDB will relay all authentication, so if your telegraf is using Basic Auth or Token based , that data will be sent to destination. LogsInfluxDB does not provide any logs for troubleshooting Does InfluxDB tells the client if any node is down?There are several scenarios: – If at least one node is still working fine, InfluxDB Relay will not return any error message. – InfluxDB relay will only return an error to client in theseRead More →