Azure: Finding Orphan Smart Detector Alert
This query can help you to identify the orphan smart detector alerts – there is also a command column which can help you to run it in shell.portal.com resources | where type in (“microsoft.alertsmanagement/smartdetectoralertrules”)| project subscriptionId, id,name,resourceGroup,properties.actionGroups.groupIds[0] , properties.scope[0] | project-rename alert_id = id, alert_subscription=subscriptionId,alert_name=name,target_id=properties_scope_0,actionGroupId=properties_actionGroups_groupIds_0 | extend target_id=tolower(tostring(target_id)) | join kind=leftouter ( resources | project id,name,type,resourceGroup,subscriptionId | extend id=tolower(tostring(id))) on $left.target_id==$right.id | where name==”” | extend target_name=split(target_id,”/”)[-1] |extend cmd_delete=strcat(“az resource delete –ids \””, alert_id,”\””)Read More →
InfluxDB- A good article
Good article: InfluxDB https://rudimartinsen.com/2017/11/07/some-influxdb-gotchas/Read More →
Git clean up and working with remote branch
Discard all your local changes: git reset –hard HEAD git clean -d -f Check local and remote branch: git branch -v -a Check out a remote branch git switch -c branch_name origin/branch_nameRead More →
Hacking Cloudflare 100MB upload limit
If you are on free plan, you might realize that you can’t upload any files larger than 100MB. This is the limit that cloudflare applies to Free plan. If you are on Enterprise , you might increase this limit to 500MB. Want over 500MB, you might need to ask cloudflare to make an exception. Cloudflare is great, but 100MB is quite small for video upload. What solution could be? – Upgrade to enterprise (oh no, i can’t afford it) – Disable the proxy – you will not benefit from cloudflare any more – Create a new direct url upload that will not go through cloudflareRead More →
WordPress – wp-admin – too many redirect
When you switch to cloudflare and your origin only serves http, if you go to /wp-admin/ you see it’s endless redirecting. To fix this – add this in your wp-config.php define(‘FORCE_SSL_ADMIN’, false);Read More →
Google Photos – Self Photo/Videos Hosting ?
Photograph is my hobby, i like photo detail so i use high resolution camera. This ends with a lot of storage. Local storage is not a big deal, but i want to put them on Cloud so i can access it anywhere. I started with ICloud Photos with 200GB plan this is good for about a year then My ICloud is full and i need to upgrade to the next plan. The next plan is 2TB , it will cost 10.99 a month. My 200GB plan is only $2.99. Why there is no such plan like 500GB or 1TB. I started to look for someRead More →
Delete files from a text file
If you got a list of file to delete, save them in a text file then run this command: while read -r file; do rm — “$file”; done < file_to_delete.txtRead More →
Why do you need a monitoring system?
Why things are broken ? It’s simply because of changes. Can we avoid changes? No. Changes could be come from internal or external. Do we know what will be impacted if there is a tiny change? A good system can track about 90% what is related. There are some minor changes that might be never recorded. We can’t avoid change, we know we might miss something, so let minimize the risk. How can we do that? we need a system to monitor our system, if something go wrong, that monitor system will trigger an alert for us and we can take action as soon asRead More →