The importance of python
1. Python is especially useful when reporting to the leader on the operation of the network and maintaining the security and stability of the network. Because the daily report, weekly report, monthly report, and indicator templates are all the same, and the source of the obtained data is basically fixed. Then you can write a script, use telnet, ssh, snmp or even database module, scrapy crawler, selenium automatic test framework and other different ways to obtain data from various systems and devices, and then operate the spreadsheet through the excel module and use the matplotlib module to generate charts. You only need to write documents based on the data. If you don't need to submit complicated documents, then even writing reports is automated, and finally you can send mail using SMTP.
3. Using Python can improve on-site operation and maintenance efficiency. It is common for network problems to occur at different locations and at different times in enterprise parks. Script the commonly used diagnostic tools and repair methods, and the commonly used configuration commands of the switch, and then use Django to encapsulate it as a mobile terminal web or WeChat applet. Going out of operation and maintenance, you can easily get it with your mobile phone. If the operation of the web is simpler, it is no problem to let the user do it directly.
4. Using Python is more conducive to the management team. Summarize daily work experience, troubleshooting methods, make wiki. It can be made by using Django as an internal blog style, share experience within the team. Those that can be made into scripts are automatically executed, try to make them as possible. Use Django or Flask to package for the web, and accumulate. With continuous maintenance and update, it becomes a set of operation and maintenance tools. The operation of each function of the webpage is as simple as possible, and the addition of a mobile phone terminal can improve daily work efficiency, make it easier to manage the team, and improve the company's efficiency.
5. Make a comprehensive alarm platform to reduce the workload. With so many logs of network devices, plus the monitoring platform and security protection platform, there are still a lot of reports to deal with every day. Due to limited energy, the log is filtered and analyzed by regular expression, and various alarms of monitoring and security platform are collected. It can be made into e-mail or websocket to make a web page, or a PC background process that can pop up window, and make SMS or wechat notification directly if possible. Make an intelligent judgment and push different alarms to different colleagues in the team. You don't have to log in to those systems and platforms every day.
Ways to practice Python
1. Start with Excel, xlwings and other modules. Think about the Excel data that you handle daily, especially those that are repeated regularly, and try to write scripts in Python for automatic processing. Excel module, whether Perl or Python, is one of the most clear and simple modules in the program library. However, the operation of Excel also has certain complexity. It will use the data structure of array (list), dictionary (hash) and other complex points, which is conducive to mastering the basic variables.
2. As a network engineer, the most basic telnet and ssh modules are required. The current simulation software also has a certain integration of python scripts, and converts those configuration command lines into scripts for automatic execution. After proficiency, you can try to encapsulate a series of actions into classes and methods, which is helpful to understand and exercise object-oriented programming.
3. To do a database, it is easy to install such as mysql and sqlite. You can try to convert the excel file or work account in your hand into a database, use python to operate, and be familiar with the database module interface.