[sos-devel] Writing sos plugin for SQL Server on Linux
Takayoshi Tanaka
tatanaka at redhat.com
Thu May 24 07:45:00 UTC 2018
Hello,
I'm working on Azure support team and now writing a plugin for $subject.
Since I'm a beginner of Python, I would appreciate your comments before I
submit a PR.
Here is a source code.
https://github.com/tanaka-takayoshi/sos/blob/mssql/sos/plugins/mssql.py
I'm concerned with a way to parse configuration file to specify the log
file location.
The location of log files is specified in mssql.conf, which is located
at /var/opt/mssql/mssql.conf by default.
This file looks like as follows.
```
[filelocation]
errorlogfile = /var/opt/mssql/log
[sqlagent]
databasemailprofile = default
errorlogfile = /var/opt/mssql/log/sqlagentlog.log
```
I'm parsing this file in this location.
https://github.com/tanaka-takayoshi/sos/blob/mssql/sos/plugins/mssql.py#L35-L48
Is this a good way to parse this conf file in Python/sos plugin?
Also, I would appreciate any comments on my code.
Thanks,
--
TAKAYOSHI TANAKA
SOFTWARE MAINTENANCE ENGINEER, RHCA, MICROSOFT MVP
Red Hat K.K. <https://www.redhat.com/>
8F, Ebisu Neonato, 4-1-18 Ebisu
Shibuya-ku Tokyo, 150-0013, Japan
tatanaka at redhat.com M: +81-80-4193-5143 IM: tatanaka
<https://red.ht/sig>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/sos-devel/attachments/20180524/fcadf9ab/attachment.htm>
More information about the sos-devel
mailing list