Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.149.235.66
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
fm-agent /
plugins /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
apache.py
19.06
KB
-rw-r--r--
apache_kafka.py
12.9
KB
-rw-r--r--
apache_zookeeper.py
6.26
KB
-rw-r--r--
bandwidth.py
21.3
KB
-rw-r--r--
cassandra.py
9.21
KB
-rw-r--r--
cert.py
2.78
KB
-rw-r--r--
couch.py
9.5
KB
-rw-r--r--
cpu_usage.py
33
KB
-rw-r--r--
dem_plugin.py
6.08
KB
-rw-r--r--
disk.py
16.48
KB
-rw-r--r--
docker.py
38.41
KB
-rw-r--r--
elasticsearch.py
2.83
KB
-rw-r--r--
entropy.py
900
B
-rw-r--r--
exim.py
1.01
KB
-rw-r--r--
file_presence.py
5
KB
-rw-r--r--
haproxy.py
13.37
KB
-rw-r--r--
io_stats.py
13.41
KB
-rw-r--r--
jboss.py
13.46
KB
-rw-r--r--
jmx.py
8.02
KB
-rw-r--r--
linux_logs.py
3.4
KB
-rw-r--r--
lm_sensors.py
2.51
KB
-rw-r--r--
logstash_forwarder.py
1.58
KB
-rw-r--r--
memcache.py
5.99
KB
-rw-r--r--
memory_usage.py
26.11
KB
-rw-r--r--
mongo.py
15.96
KB
-rw-r--r--
mysql.py
19.74
KB
-rw-r--r--
nagios.py
5.36
KB
-rw-r--r--
nginx.py
11.96
KB
-rw-r--r--
nodejs.py
6.29
KB
-rw-r--r--
ntp.py
1.98
KB
-rw-r--r--
opcache.py
2.26
KB
-rw-r--r--
oracle.py
15.15
KB
-rw-r--r--
package_upgrade.py
8.08
KB
-rw-r--r--
phpfpm.py
5.51
KB
-rw-r--r--
ping.py
2.45
KB
-rw-r--r--
postfix.py
1.98
KB
-rw-r--r--
postgresql.py
19.13
KB
-rw-r--r--
process.py
16.32
KB
-rw-r--r--
rabbitmq.py
19.33
KB
-rw-r--r--
redis.py
11.19
KB
-rw-r--r--
sendmail.py
2.39
KB
-rw-r--r--
sysctl.py
1.46
KB
-rw-r--r--
tcp.py
6.26
KB
-rw-r--r--
template.py
3.28
KB
-rw-r--r--
tomcat.py
6.79
KB
-rw-r--r--
tomcat_jmx.py
15.82
KB
-rw-r--r--
unbound_dns.py
4.54
KB
-rw-r--r--
uptime.py
3.46
KB
-rw-r--r--
users.py
1.09
KB
-rw-r--r--
uwsgi.py
4.57
KB
-rw-r--r--
varnish.py
4.79
KB
-rw-r--r--
weblogic.py
13.38
KB
-rw-r--r--
weblogic12c.py
18.75
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : apache_zookeeper.py
import agent_util import sys import socket import traceback def netcat(hostname, port, content): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((hostname, port)) s.sendall(content) s.shutdown(socket.SHUT_WR) while 1: data = s.recv(1024) if data == "": break response = data break s.close() return response def nc_to_dict(data): parsed = {} a = data.split('\n') for l in a: try: b = l.split('\t') parsed[b[0]] = b[1] except: continue return parsed class ApacheZookeeperPlugin(agent_util.Plugin): textkey = "apache_zookeeper" label = "Apache Zookeeper" @classmethod def get_metadata(self, config): status = agent_util.SUPPORTED msg = None if status == agent_util.SUPPORTED and (not "host" in config or not "port" in config): msg = "The host and port entries were not found in the [apache_zookeeper] block in the agent config file." self.log.info(msg) status = agent_util.MISCONFIGURED return {} if status == agent_util.SUPPORTED: response = None try: response = netcat(config['host'], int(config['port']), 'envi') except: self.log.exception("Error running Zookeeper hello") self.log.debug(traceback.format_exc()) status = agent_util.MISCONFIGURED msg = "" return {} if response is None or response == '': self.log.exception("Bad response running Zookeeper hello") return {} data = { # basic "avg_latency": { "label": "Average request latency", "options": None, "status": status, "error_message": msg, "unit": "ms" }, "max_latency": { "label": "Maximum request latency", "options": None, "status": status, "error_message": msg, "unit": "ms" }, "packets_received": { "label": "Packets received", "options": None, "status": status, "error_message": msg, "unit": "packets" }, "packets_sent": { "label": "Packets sent", "options": None, "status": status, "error_message": msg, "unit": "packets" }, "packets_received_per_sec": { "label": "Packets received/sec", "options": None, "status": status, "error_message": msg, "unit": "packets/sec" }, "packets_sent_per_sec": { "label": "Packets sent/sec", "options": None, "status": status, "error_message": msg, "unit": "packets/sec" }, "outstanding_requests": { "label": "Outstanding Requests", "options": None, "status": status, "error_message": msg, "unit": "" }, "server_state": { "label": "Server Mode", "options": None, "status": status, "error_message": msg, "unit": "" }, "znode_count": { "label": "Node count", "options": None, "status": status, "error_message": msg, "unit": "" }, "watch_count": { "label": "Watcher Count", "options": None, "status": status, "error_message": msg, "unit": "" }, "approximate_data_size": { "label": "Approximate data size", "options": None, "status": status, "error_message": msg, "unit": "bytes" }, "open_file_descriptor_count": { "label": "Open file descriptors", "options": None, "status": status, "error_message": msg, "unit": "files" }, "fsync_threshold_exceed_count": { "label": "Slow fsync count", "options": None, "status": status, "error_message": msg, "unit": "" }, "ruok": { "label": "Node error state", "options": None, "status": status, "error_message": msg, "unit": "" } } return data def check(self, textkey, data, config): if textkey == 'ruok': output = netcat(config['host'], int(config['port']), 'ruok') if output == 'imok': return 0 else: return 1 else: output = netcat(config['host'], int(config['port']), 'mntr') data = nc_to_dict(output) key = 'zk_' + str(textkey.replace('_per_sec', '')) value = data.get(key, False) if textkey == 'server_state': if value == 'follower': return 0 if value == 'leader': return 1 if textkey == "packets_received_per_sec" or textkey == "packets_sent_per_sec": self.log.debug(data) if value > 0: cached = self.get_cache_results(textkey, None) self.cache_result(textkey, None, value, replace=True) self.log.debug("####\nGot cached result!\n%s" % cached) print("####\nGot cached result!\n%s" % cached) delta, c = cached[0] rate = (float(value) / float(c)) / float(delta) return rate else: return 0 if value: return float(value) else: return None
Close