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 projectRead 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: import signal class timeout: def __init__(self, seconds): self._seconds = seconds def __enter__(self): # Register and schedule the signal with the specified time signal.signal(signal.SIGALRM, timeout._raise_timeout) signal.alarm(self._seconds) return self def __exit__(self, exc_type, exc_value, traceback):Read 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] [[inputs.sqlserver]] # QA1 DB servers = [ “Server=localhost;Port=1433;User Id=sa;Password=myp@ssw0rd;” ] [inputs.sqlserver.tags] sql_db_remote_host = “localhost”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 [[inputs.syslog]] # ## Specify an ip or hostname with port – eg., tcp://localhost:6514, tcp://10.0.0.1:6514 # ## Protocol, address and port to host the syslog receiver. # ## If no host is specified, then localhost is used. # ## If no port is specified, 6514 is used (RFC5425#section-4.1). server = “udp://:6514” systemctl restartRead 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 →

I’m running Catalina 10.15.2 and today i tried to install “brew”. During the installation, it required x-code-select, i installed it and got this error “Can’t install the software because it is not currently available from the Software Update server”. I tried to install X-code, but it didn’t help. Finally i had to go to this place https://developer.apple.com/download/more/ and search for Command Line tools to install.Read More →

I spent my weekend to setup an InfluxDB infrastructure. My goal is to have a high availability infrastructure. If you do some readings, you will see that the high availability only available in Enterprise version. There is some alternatives, i select the most simple way to do: InfluxDB with InfluxDB relay. My architecture includes: one InfluxDB relay and 2 Data Nodes. I don’t go to the setup detail here but i want to share some knowledge when i do the setup. I start with the good things first: – Data is replicated into 2 two nodes ( 2 nodes will have the same data)– InfluxDB-relayRead More →

If your cron job is not running as expected check the following: – permission for this file should be 600 – one one can read except root – check the syntax – you need to provide the user that the job should run with ( this is different with crontab -e where it will use the current user) – sometimes your file may have some special characters such as ^M, you don’t see them in normal editor , you can run this command : cat -v /etc/cron.d/your_cron_job file – Make sure that cron service is running:  ps -aux | grep cron – check the logRead More →