turanalmammadov opened a new pull request, #4037:
URL: https://github.com/apache/hertzbeat/pull/4037

   Related: #3737
   
   ## What's Changed?
   
   Added password expiry monitoring for SQL Server login accounts.
   
   ### New Metric: account_expiry
   
   | Field | Type | Description |
   |-------|------|-------------|
   | name | string | SQL Server login name |
   | type | string | Login type (SQL/Windows/Group/etc.) |
   | is_disabled | number | Whether the account is disabled |
   | password_expiry_date | string | Expiration date |
   | days_until_expiry | number | Days remaining (DATEDIFF) |
   
   ### SQL Query
   ```sql
   SELECT name, 
     CASE WHEN type_desc = 'SQL_LOGIN' THEN 'SQL Login' ... END as type,
     is_disabled, password_expiry_date,
     DATEDIFF(day, GETDATE(), password_expiry_date) as days_until_expiry
   FROM sys.sql_logins 
   WHERE is_disabled = 0 
   ORDER BY password_expiry_date ASC;
   ```
   
   ### Task List Progress (from #3737)
   - [x] app-mariadb.yml (PR #4032)
   - [x] app-mongodb.yml (PR #4033)
   - [x] app-sqlserver.yml (this PR)
   
   Signed-off-by: Turan Almammadov 
<[email protected]>
   
   Made with [Cursor](https://cursor.com)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to