Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
import agent_util
import logging
logger = logging.getLogger(__name__)
class UsersPlugin(agent_util.Plugin):
textkey = "users"
label = "Users"
@classmethod
def get_metadata(self, config):
status = agent_util.SUPPORTED
msg = None
options = []
data = {
"users.unique_login_count": {
"label": "Users unique login count",
"options": options,
"status": status,
"error_message": msg,
},
"users.total_login_count": {
"label": "Users total login count",
"options": options,
"status": status,
"error_message": msg,
},
}
return data
def check(self, textkey, data, config):
query = ""
if textkey == "users.unique_login_count":
query = "who |cut -c 1-9 |sort -u |wc -l"
if textkey == "users.total_login_count":
query = "who | wc -l"
ret, output = agent_util.execute_command("%s" % query)
return int(output)