Logging, Troubleshooting & iControl REST Automation
F5 BIG-IP LTM F5 BIG-IP VE (GUI + TMSH)
مقصدObjectiveObjective
اس سبق میں آپ BIG-IP logs پڑھیں گے، tcpdump سے ٹریفک کیپچر کریں گے، qkview بنائیں گے، اور iControl REST سے pools مینج کریں گے۔Is lesson mein aap BIG-IP logs parhenge, tcpdump se traffic capture karenge, qkview banayenge, aur iControl REST se pools manage karenge.In this lesson you will read BIG-IP logs, capture traffic with tcpdump, create a qkview, and manage pools using iControl REST.
آسان مثالSimple AnalogySimple Analogy
Logs BIG-IP کی ڈائری ہیں، tcpdump نیٹ ورک پر اس کے کان ہیں، اور iControl REST اس کے ہاتھ ہیں — automation آپ کو ہاتھ دیتا ہے جب آپ کا وقت ختم ہو جائے۔Logs BIG-IP ki diary hain, tcpdump network par us ke kaan hain, aur iControl REST us ke hath hain — automation aap ko hath deta hai jab aap ka waqt khatm ho jaye.Logs are the BIG-IP's diary, tcpdump is its ears on the network, and iControl REST is its hands — automation gives you hands when your own time runs out.
سیٹ اپLab SetupLab Setup
BIG-IP VE پچھلے سبق کے web-pool اور web-vip کے ساتھ۔BIG-IP VE pichlay lessons ke web-pool aur web-vip ke sath.BIG-IP VE with web-pool and web-vip configured from previous lessons.
اقداماتStepsSteps
Step 1
LTM لوگ پڑھیں۔ اس میں monitor کے نتائج، failover events اور کنفیگریشن کی تبدیلیاں درج ہوتی ہیں۔LTM log parhen. Is mein monitor ke nataij, failover events aur configuration ki tabdeeliyan darj hoti hain.Read the LTM log. It records monitor results, failover events, and configuration changes.
tail -50 /var/log/ltm
Step 2
tmsh کے اندر سے LTM لوگ دیکھیں — CLI سے باہر نکلے بغیر وہی معلومات۔tmsh ke andar se LTM log dekhen — CLI se bahar nikle baghair wahi maloomat.View the LTM log from inside tmsh — same information without leaving the CLI.
tmsh show sys log ltm | head -30
Step 3
VIP کے لیے external انٹرفیس پر ٹریفک کیپچر کریں۔ Packets آتے اور جاتے دیکھیں۔VIP ke liye external interface par traffic capture karein. Packets aate aur jate dekhen.Capture traffic on the external interface for the VIP. Watch the packets arrive and go out.
tcpdump -i external host 172.16.1.100 -c 20
Step 4
qkview support snapshot بنائیں — جب آپ case کھولیں تو F5 support یہی مانگتا ہے۔qkview support snapshot banayen — jab aap case kholen to F5 support yahi mangta hai.Generate a qkview support snapshot — this is what F5 support asks for when you open a case.
qkview
Step 5
iControl REST: GET call سے تمام pools کی فہرست لیں۔ BIG-IP JSON میں جواب دیتا ہے۔iControl REST: GET call se tamam pools ki list lein. BIG-IP JSON mein jawab deta hai.iControl REST: list all pools with a GET call. The BIG-IP answers with JSON.
curl -sk -u admin:admin https://192.168.1.245/mgmt/tm/ltm/pool | python3 -m json.tool | head -40
Step 6
iControl REST: POST call سے نیا pool بنائیں — GUI والا ہی کام، لیکن script سے۔iControl REST: POST call se naya pool banayen — GUI wala hi kaam, lekin script se.iControl REST: create a new pool with a POST call — the same action as the GUI, done from a script.
curl -sk -u admin:admin -X POST https://192.168.1.245/mgmt/tm/ltm/pool -H 'Content-Type: application/json' -d '{"name":"api-pool","monitor":"tcp"}'تصدیقVerifyVerify
تصدیق: آپ ایک LTM لوگ انٹری تلاش کر سکتے ہیں، VIP انٹرفیس پر tcpdump چلا سکتے ہیں، اور iControl REST سے pools کی فہرست لے سکتے ہیں۔Tasdeeq: aap ek LTM log entry talash kar sakte hain, VIP interface par tcpdump chala sakte hain, aur iControl REST se pools ki list le sakte hain.Verify: you can find an LTM log entry, run tcpdump on the VIP interface, and list pools via iControl REST.
tmsh show sys log ltm tcpdump -i external host 172.16.1.100 -c 5
خرابی دور کرناTroubleshootingTroubleshooting
⚠️ iControl REST 401 Unauthorized دے رہا ہےiControl REST 401 Unauthorized de raha haiiControl REST returns 401 Unauthorized
✅ Username اور password چیک کریں، اور تصدیق کریں کہ اس صارف کو REST API کی اجازت ہے۔Username aur password check karein, aur tasdeeq karein ke us user ko REST API ki ijazat hai.Check the username and password, and confirm REST API access is allowed for that user.
⚠️ tcpdump انٹرفیس پر کوئی ٹریفک نہیں دکھا رہاtcpdump interface par koi traffic nahi dikha rahatcpdump shows no traffic on the interface
✅ چیک کریں کہ آپ صحیح انٹرفیس اور VLAN پر ہیں، اور تصدیق کریں کہ کلائنٹ واقعی requests بھیج رہا ہے۔Check karein ke aap sahi interface aur VLAN par hain, aur tasdeeq karein ke client waqei requests bhej raha hai.Check you are on the right interface and VLAN, and confirm the client is actually sending requests.
⚠️ لوگ فائل بہت بڑی ہے، پڑھ نہیں سکتےLog file bohat bari hai, parh nahi sakteLog file is too large to read
✅ پوری فائل پڑھنے کے بجائے keywords کے لیے grep استعمال کریں (مثال: grep -i fail /var/log/ltm)۔Poori file parhne ke bajaye keywords ke liye grep istemal karein (misal: grep -i fail /var/log/ltm).Use grep to filter for keywords (e.g. grep -i fail /var/log/ltm) instead of reading the whole file.
انٹرویو سوالاتInterview Q&AInterview Q&A
❓ qkview کیا ہے اور کب استعمال ہوتا ہے؟qkview kya hai aur kab istemal hota hai?What is a qkview and when is it used?
qkview BIG-IP کی config، logs اور system state کا support snapshot ہوتا ہے، جو F5 support مسئلہ حل کرنے کے لیے استعمال کرتا ہے۔qkview BIG-IP ki config, logs aur system state ka support snapshot hota hai, jo F5 support masalah hal karne ke liye istemal karta hai.qkview is a support snapshot of the BIG-IP's config, logs, and system state, used by F5 support to diagnose issues.
❓ iControl REST کیا ہے اور یہ کس لیے use ہوتا ہے؟iControl REST kya hai aur yeh kis liye use hota hai?What is iControl REST and what is it used for?
iControl REST BIG-IP پر ایک REST API ہے جو scripts اور tools کو HTTPS calls کے ذریعے کنفیگریشن بنانا، پڑھنا، اپڈیٹ اور ڈیلیٹ کرنے دیتا ہے۔iControl REST BIG-IP par ek REST API hai jo scripts aur tools ko HTTPS calls ke zariye configuration banana, parhna, update aur delete karne deta hai.iControl REST is a REST API on the BIG-IP that lets scripts and tools create, read, update, and delete configuration with HTTPS calls.