We have so many application insights created in our environment. It’s not easy to see which application is reporting correctly. I want to have a report how many requests that the application is sent to Application Insights. This will help us to identify if there is a problem with integration or the application is no longer in production or might be it can help to detect the application is down for long time. Finally i come with a solution with PHP and Azure CLI . I create a file name report.php ( see the file at the bottom) . Here is the step to run:Read More →

I’m a fan of PHP and docker make my life better. It’s difficult to maintain our favorite tool in a live system as our host system keeps updating and it could break our tool. I want to run Azure CLI in a docker environment. It’s easy to start , just using this command: My problem is that, this Microsoft image doesn’t have the tool i need – it’s PHP. I want to do some cool stuff with PHP and Azure CLI. So, why don’t we build a new Azure CLI image from our existing Microsoft Azure CLI ? Finally, i go with this Dockerfile ToRead More →

I’m using smokeping, i see a bunch of files that is no longer needed. To be safe, i want to rename find these files and rename them. I came with this solution The above command will find all files with ext .rrd and not modified in the last 30 days.Read More →

Sometimes you are under a situation that you don’t know what’s going on with the server, it’s like a blackbox. How to get some lights in this? The answer is strace . strace is a utility that will help you see what your application is doing, what file it’s opening, what is it trying to do. How to start? the most common way to do is : you have a pid of your application , then just run this command: How about other cases, like you have multiple process like web server, when a server start, it will start with at least 4 processes. WhenRead More →

As we all know, to monitor our PHP application performance with Datadog , we need to install 2 components – datadog-agent and its PHP package. The data-agent is a server listening on port 8126 to receive tracer/span from our application. The PHP package is used to inject some library to our run time PHP, it does some magic thing to collect our PHP application such as response time, database connection. Have you ever wondered what data that datadog tracing library send to its agent? Today we do a little trick , instead of using datadog-agent to receive data, we will use some tools to receiveRead More →

When i use Datadog to collect tracer/span in our PHP , i realize that Datadog library does not collect the client IP address. I don’t know what the reason behind this, but not having the client IP is very hard to troubleshoot the issue. After a while i figured out the way to hack the code. The hack is to modify this file /opt/datadog-php/dd-trace-sources/bridge/_generated.php This is my modification – check the line #================My Customize codeRead More →