Graphite-Web Cluster: don’t see data from remote location
I have a graphite setup using a docker , now i setup another stand-alone graphite instance , i setup them as a cluster meaning both of them can see data each other. The weird thing is that the docker instance can see data from stand alone instance. But stand alone instance can’t see data in docker instance. i doubt it’s a network issue, but it’s not , i can see stand-alone sending query to docker. i don’t see any error in the graphite web log, i finally find a way to turn on the log. We need to turn on DEBUG=True in local_settings.py , thenRead More →
Redhat 7: collectd
I had some difficulties when trying to install collectd on Redhat 7 – the error was No package collectd available. I tried different method, and ends up with this solutionRead More →
Redhat 7: iptables not saved after a reboot
All my iptables rules gone when i reboot Install iptables-save service: Save your rules Make sure that your iptables service is onRead More →
Redhat 7: Network interface is not up after a reboot
Everytime i restart my machine, the network interface is always down, i need to run this command : ifup enp0s3 Here is the fix: Open the config file /etc/sysconfig/network-scripts/ifcfg-enp0s3 Change the value: ONBOOT=no to ONBOOT=yes If you don’t see this value, add itRead More →
mitmproxy – Debugging your web
I think i need to bookmark this website https://mitmproxy.org/ . This is an open source proxy. Why do i bookmark this instead of other proxy? The beauty of this proxy is coming from the fact it can interfere with the content, meaning you can modify the web traffic between your browser , it’s like the middle man , it can watch the traffic and modify it as well. Another great feature is that it will also allow you to capture https traffic, this is done by installing a root certificate to your machine. This will remove all https warning.Read More →
Puppeteer – Execution context was destroyed, most likely because of a navigation
I fixed that issue by usingRead More →
Python: parsing command line parameters
I hava a small utility which accept some input from command line from another system. To keep the utility more open, i don’t want to restrict some parameters, the caller can provide more parameters, i will just need to ignore them. In Python, we use argparse for this job, by default if the user provide more parameters that you expect, it will trigger the error. There is a way to overcome this Below is the script i use for this job, Read More →
PHP: command line options
Supposed that you have a command line like this: How do you get that options in php? Please note the “:” in the option myscript.php –url “http://www.google.com” –proxy “127.0.0.1:8080” Read More →
Python: parse_qsl and semi colon (;)
let say you have a query string ?var1=test;abc&var2=ok when you use function parse_qsl to parse query to get the variable , you will see you have a several variables: var1 = testabc=””var2=ok This is because parse_qsl use “&” and “;” as a separate , to overcome this we need to replace “;” with %3B , then we’ll replace it back in our variable valuesRead More →