Member since
07-14-2016
215
Posts
45
Kudos Received
16
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2222 | 12-13-2018 05:01 PM | |
5008 | 09-07-2018 06:12 AM | |
2065 | 08-02-2018 07:04 AM | |
2272 | 03-26-2018 07:38 AM | |
1442 | 12-06-2017 07:53 AM |
08-01-2019
06:01 AM
stderr: /var/lib/ambari-agent/data/errors-685.txt when I try the latest the following error is occured. Can you help me? Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/METRON/0.7.1.1.9.1.0/package/scripts/enrichment_master.py", line 121, in <module> Enrichment().execute() File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 375, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/METRON/0.7.1.1.9.1.0/package/scripts/enrichment_master.py", line 62, in start self.configure(env) File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 120, in locking_configure original_configure(obj, *args, **kw) File "/var/lib/ambari-agent/cache/common-services/METRON/0.7.1.1.9.1.0/package/scripts/enrichment_master.py", line 52, in configure metron_service.init_zk_config(params) File "/var/lib/ambari-agent/cache/common-services/METRON/0.7.1.1.9.1.0/package/scripts/metron_service.py", line 43, in init_zk_config path=ambari_format("{java_home}/bin") File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__ self.env.run() File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run self.run_action(resource, action) File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action provider_action() File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 262, in action_run tries=self.resource.tries, try_sleep=self.resource.try_sleep) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner result = function(command, **kwargs) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper result = _call(command, **kwargs_copy) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 303, in _call raise ExecutionFailed(err_msg, code, out, err) resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/hcp/1.9.1.0-6/metron/bin/zk_load_configs.sh --zk_quorum master.sip.com:2181,worker1.sip.com:2181,worker2.sip.com:2181 --mode PUSH --input_dir /usr/hcp/1.9.1.0-6/metron/config/zookeeper' returned 127. /bin/bash: /usr/hcp/1.9.1.0-6/metron/bin/zk_load_configs.sh: No such file or directory
... View more
04-15-2019
05:22 AM
Hello @Tony Jabbour can you post the output of metron/metron-deployment/scripts/platform-info.sh
... View more
12-17-2018
03:29 PM
@asubramanian The buildrpms command didn't work for me. Please find screenshot of the result of the command mvn clean package-Pbuild-rpms. One more thing I want to run the metron for ubuntu14 . Is "mvn clean package-Pbuild-rpms" is for centOS and mvn clean package-Pbuild-debs is for ubuntu ??screen-shot-2018-12-17-at-122403-pm.jpg
... View more
04-22-2019
01:03 AM
thanks @asubramanian
... View more
12-18-2018
01:04 PM
@asubramanian Hello sir, I installed metron with hcp mpack with ambari. The metron version 0.5.0. The installation on bare metal with centos 7. Yes, the 'user_settings' is automatically created, maybe i have some problem with my installation.
... View more
12-13-2018
10:41 AM
Thanks @Amirul , I try to install HCP 1.6.0 on Centos 7 but in ambari server metron and elasticsearch services not exist. I have same problem in installation HCP 1.7.1 . please see my question in below link : https://community.hortonworks.com/questions/229345/problem-in-installing-hcp-171-using-ambari.html --- finaly can you provide Installation guide with details ( Step by Step from OS installation and hardware requirements - software installation and etc ) ?
... View more
10-17-2018
05:31 AM
Hey @Nor Liana
Kamaruzzaman, this is great news! I am glad you were able to resolve the issues. Would you mind accepting the answer that helped you the most? Cheers, Anand
... View more
09-27-2018
02:23 PM
@Rudy Hartono, I cannot think of an immediate demerit at this point. Metron is actively having a lot of features added, at a quick pace in that. If any feature comes up that makes use of the HDFS store, then there is a chance you will miss the functionality if you have disabled writing in the first place. If you think my response helped, would you mind marking the answer as accepted? Thank you.
... View more
08-02-2018
07:36 AM
@Rakesh S - refer to http://dev.hortonworks.com.s3.amazonaws.com/HDPDocuments/Ambari-Trunk/bk_ambari-installation/content/ch_using-local-repos.html
... View more
05-24-2018
09:28 AM
1 Kudo
About this article
The Metron tutorial article for adding Squid telemetry walks through the process of creating the parser from scratch for Elasticsearch as the Indexing service.
This article gives details of extending the tutorial for getting Squid telemetry working with Solr as the backend Indexing service.
In other words, these steps are an equivalent of "Installing Squid parser template" for the Elasticsearch.
Pre-requisites
HCP >= 1.5.0.0
HDP search >= 3.0.0
It is assumed that you have deployed a HCP stack with Solr by following the HCP documentation
The Solr node is co-located with the Metron node.
In the event that these nodes are on different hosts, ensure that you copy the Metron schema files located at $METRON_HOME/config/schema to the Solr node.
It is also assumed that you have followed the Metron tutorial for Squid telemtry by installing the squid sensor, creating the kafka topic and have started the storm topology
Steps
1. SSH to the Metron host and run the following commands
cd $METRON_HOME/config/schema
mkdir squid
cd squid
Copy the attached files (schema.xml and solrconfig,xml) into the 'squid' folder created above.
2. Run the following commands on the Metron host to create a Solr collection for Squid
export SOLR_HOME=/opt/lucidworks-hdpsearch/solr/
export SOLR_USER=solr
su $SOLR_USER -c "$SOLR_HOME/bin/solr create -c squid -d $METRON_HOME/config/schema/squid/"
3. Go to the Solr UI at http://<solr-host>:8983/solr/#/~collections to confirm that the Squid collection is present
4. Ingest events into the 'squid' kafka topic and you should see documents being written into the Squid collection in Solr.
5. Fire up Alerts UI and verify that Squid events are seen.
... View more
- Find more articles tagged with:
- CyberSecurity
- FAQ
- Metron
- solr
- squid
Labels:
06-27-2018
10:11 PM
I encountered similar problem with EL7 and python requests=2.6.0, fixed as below: [root@XXXX ~]# yum remove python-requests-2.6.0-1.el7_1.noarch
Loaded plugins: langpacks, product-id, search-disabled-repos
Repository HDP-UTILS-1.1.0.21 is listed more than once in the configuration
Resolving Dependencies
Installed size: 774 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : insights-client-3.0.3-9.el7_5.noarch 1/2
warning: /etc/insights-client/insights-client.conf saved as /etc/insights-client/insights-client.conf.rpmsave
Erasing : python-requests-2.6.0-1.el7_1.noarch 2/2
Verifying : python-requests-2.6.0-1.el7_1.noarch 1/2
Verifying : insights-client-3.0.3-9.el7_5.noarch 2/2
Removed:
python-requests.noarch 0:2.6.0-1.el7_1
Dependency Removed:
insights-client.noarch 0:3.0.3-9.el7_5
Complete!
[root@XXXX ~]# pip install requests
Collecting requests
Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
100% |████████████████████████████████| 92kB 5.2MB/s
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests) (3.0.4)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests) (2018.4.16)
Installing collected packages: requests
Successfully installed requests-2.19.1
... View more
04-06-2018
07:39 PM
I'm having a similar issue. In my case I'm feeding Yaf data to Kafka (it works correctly). Then it gives the parsing error: java.lang.IllegalStateException: Grok parser Error: Grok statement produced a null message. Original message was: I used the Metron's default YAF Grok pattern. I have checked the logs in http://grokconstructor.appspot.com and it is able to correctly match the pattern. Furthermore, I use the "Test" button on Metron's UI to check whether the patter is able to extract the fields from the log and it also works correctly.
Does anyone knows why this fails? Example Log: 2018-04-04 10:05:32.533|2018-04-04 10:05:32.533| 0.000| 0.000| 6| 10.5.0.83| 2869| 10.5.0.97|52023| AR| 0| 0| 0|c019c454|00000000|000|000| 1| 40| 0| 0| 0| Yaf Pattern YAF_TIME_FORMAT %{YEAR:UNWANTED}-%{MONTHNUM:UNWANTED}-%{MONTHDAY:UNWANTED}[T ]%{HOUR:UNWANTED}:%{MINUTE:UNWANTED}:%{SECOND:UNWANTED} YAF_DELIMITED %{YAF_TIME_FORMAT:start_time}\|%{YAF_TIME_FORMAT:end_time}\|%{SPACE:UNWANTED}%{BASE10NUM:duration}\|%{SPACE:UNWANTED}%{BASE10NUM:rtt}\|%{SPACE:UNWANTED}%{INT:protocol}\|%{SPACE:UNWANTED}%{IP:ip_src_addr}\|%{SPACE:UNWANTED}%{INT:ip_src_port}\|%{SPACE:UNWANTED}%{IP:ip_dst_addr}\|%{SPACE:UNWANTED}%{INT:ip_dst_port}\|%{SPACE:UNWANTED}%{DATA:iflags}\|%{SPACE:UNWANTED}%{DATA:uflags}\|%{SPACE:UNWANTED}%{DATA:riflags}\|%{SPACE:UNWANTED}%{DATA:ruflags}\|%{SPACE:UNWANTED}%{WORD:isn}\|%{SPACE:UNWANTED}%{DATA:risn}\|%{SPACE:UNWANTED}%{DATA:tag}\|%{GREEDYDATA:rtag}\|%{SPACE:UNWANTED}%{INT:pkt}\|%{SPACE:UNWANTED}%{INT:oct}\|%{SPACE:UNWANTED}%{INT:rpkt}\|%{SPACE:UNWANTED}%{INT:roct}\|%{SPACE:UNWANTED}%{INT:app}\|%{GREEDYDATA:end_reason}
... View more
04-03-2018
11:30 AM
Here's the issue... you need to install docker ./platform-info.sh: line 64: docker: command not found
... View more
03-21-2018
10:00 AM
@Geoffrey Shelton Okot I install it on bare metal, i have 1 dedicated server for ambari. if i want to uninstall metron and reinstall it on the cluster again, how to do it?
... View more
12-14-2017
08:26 AM
@Gaurav Bapat what do you see in the system logs (/var/log/messages) of the vagrant node? If you are seeing memory issues there, then its likely a system crunch problem and you will need to find a more powerful system to try.
... View more
12-12-2017
11:14 AM
@asubramanian All the components get failed when I run mvn clean install from the top directory, what can be the error??
... View more
11-28-2017
08:55 AM
2 Kudos
This article serves as an addendum to the main Metron MaaS
README doc in Apache Metron github. It is highly recommended that you go through the README article in github to understand the concepts and working principle. This article only intends to capture the steps specific to the Metron full dev vagrant platform so it is easy for a user to copy-paste-run and get it working quickly. Further, this article only covers the successful startup, deployment and validation of the Metron MaaS service. Refer to the master github README for further steps. Prerequisites
* You need to have a working Metron full dev platform before you proceed with the instructions Step 1:Install Required Packages
Run the following commands to install Flask, Jinja2, Squid client and the Elasticsearch HEAD plugin:
vagrant ssh #To SSH onto the full-dev platform
sudo yum install python-flask
sudo yum install python-jinja2
sudo yum install squid
sudo service start squid
sudo /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head
Step 2: Create Mock DGA service files
Run the following commands:
sudo su - metron
mkdir mock_dga
cd mock_dga
Download the files from this
link and copy to the folder. Alternativey you use the following commands to create the files:
* vi dga.py
(paste the below code snippet, save and quit)
from flask import Flask
from flask import request,jsonify
import socket
app = Flask(__name__)
@app.route("/apply", methods=['GET'])
def predict():
h = request.args.get('host')
r = {}
if h == 'yahoo.com' or h == 'amazon.com':
r['is_malicious'] = 'legit'
else:
r['is_malicious'] = 'malicious'
return jsonify(r)
if __name__ == "__main__":
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost', 0))
port = sock.getsockname()[1]
sock.close()
with open("endpoint.dat", "w") as text_file:
text_file.write("{\"url\" : \"http://0.0.0.0:%d\"}" % port)
app.run(threaded=True, host="0.0.0.0", port=port)
* vi rest.sh
(paste the below code snippet, save and quit)
#!/bin/bash
python dga.py
Run these commands to make the files executable
chmod +x /home/metron/mock_dga/*
Step 3: Create HDFS directories
Run the following commands as
vagrant user, and _not_ as metron user
sudo su - hdfs -c "hadoop fs -mkdir /user/metron"
sudo su - hdfs -c "hadoop fs -chown metron:metron /user/metron"<br>
Step 4: Start MaaS service
Run the following commands:
Note: Change the METRON_HOME variable per the version of Metron you are running
sudo su - metron
export METRON_HOME=/usr/metron/0.4.2
$METRON_HOME/bin/maas_service.sh -zq node1:2181
Verify MaaS service running and view application log
Follow these steps to ensure that the maas service is running properly
1. Launch Ambari UI at http://node1:8080. Authenticate with admin/admin
2. Go to Services -> YARN -> 'Quick Links' dropdown -> ResourceManager UI
3. You should be able to see the application listed in the UI, similar to the below:
4. Click on the application -> Logs -> AppMaster.stderr log file to view the startup logs. Check for presence of any errors. If there are none, you are good to deploy the DGA model in the next step. Step 5: Deploy Mock DGA model
Run the following command as metron user to deploy the DGA model
$METRON_HOME/bin/maas_deploy.sh -zq node1:2181 -lmp /home/metron/mock_dga -hmp /user/metron/models -mo ADD -m 512 -n dga -v 1.0 -ni 1
Once the command completes, you can monitor the ResourceManager UI application logs to check for any errors. Verify DGA model has been successfully deployed
a) Run the following command as metron user:
$METRON_HOME/bin/maas_deploy.sh -zq node1:2181 -mo LIST
At the end of the command execution, you should be able to see something similar to the following output, which indicates that the model has been successfully deployed. Model dga @ 1.0
dga:1.0 @ http://node1:50451 serving:
apply=apply
Note: The port number '50451' in the above output may change across different runs.
b) Try to hit the model via curl by running the following commands, and verify you are seeing the respective outputs. [metron@node1 ~]$ curl 'http://localhost:50451/apply?host=testing.com'
{
"is_malicious": "malicious"
}
[metron@node1 ~]$ curl 'http://localhost:50451/apply?host=yahoo.com'
{
"is_malicious": "legit"
}
With this you would have been able to successfully started, deployed and validated Metron MaaS on your full dev Metron platform. Step 6: Squid Example The next steps of sending data through the squid sensor and having it processed through the MaaS is not covered as a part of this article. Please refer to the steps listed in the github README doc.
... View more
- Find more articles tagged with:
- CyberSecurity
- full-dev
- how-to-tutorial
- How-ToTutorial
- maas
- Metron
- model-as-a-service
Labels:
12-15-2017
12:07 PM
@asubramanian SELinux is preventing /usr/bin/install from read access Also there is TLS handshake error and connection refused error on my Hbase&Metron component
... View more
11-27-2017
01:24 PM
Thanks @asubramanian,
I have cleared the existing Elasticsearch indices. We have installed the Metron 0.4.1 manually in Ubuntu 14 as per the steps provided below URL,
https://community.hortonworks.com/articles/88843/manually-installing-apache-metron-on-ubuntu-1404.html
Uploaded Elasticsearch templates into ES and executed sensor-stubs. Now it is working.
... View more
11-28-2017
03:15 PM
I would pursue installation through Ambari, you will have a much easier time. Try the suggestion from @asubramanian and if you still run into issues, let us know and we'll help you through it and/or fix bugs if necessary.
... View more
11-16-2017
10:24 PM
There is also a metron_rest_classpath parameter that can be used for the same purpose (both of these parameters are added to the REST application classpath). You might want to consider keeping just /path/to/metron-elasticsearch-*-uber.jar in metron_indexing_classpath and moving the others to metron_rest_classpath. Probably won't matter now but could cause issues down the road if metron_indexing_classpath is ever reused for something else.
... View more
11-10-2017
06:32 AM
Hello @anggit wisnu, it looks like docker is not running on your system. Can you install docker, ensure that it is running and then try the above again?
... View more
11-14-2017
05:50 AM
Hey @new data, glad to hear that you were able to resolve the issue! Would you mind marking the answer as accepted ?
... View more
11-21-2017
08:43 PM
When cloning and building Metron locally you have to be careful about adding extra files within your local copy. There is a plugin that runs (Apache Rat) that checks for licenses whenever you build. You likely added some files that don't have license headers and your best bet is to remove the files flagged in /path/to/metron/target/rat.txt.
... View more
10-17-2017
06:39 PM
1 Kudo
Hi @Ashikin, can you provide the details of your test environment and describe the steps you carried out? Also it would be better to try with the more recent HCP 1.3 version.
... View more
10-25-2017
07:21 PM
@bigdata smalldata could you set the question to answered (by selecting the best anwser) if sufficiently answered?
... View more
07-17-2017
04:28 PM
@asubramanian below is my application.yml file. And versions are: Metron 0.4.0.1.1.0.0
hcp is 1.1.0.0-71 server:
port: 8082
spring: datasource:
driver ClassName: com.mysql.jdbc.Driver url: jdbc:mysql://ip-10-0-1-203.ec2.internal:3306/metronrest username: Admin password: Admin platform: h2 jpa: hibernate:
ddl-auto: update zookeeper: url: ${ip-10-0-1-203.ec2.internal:2181,ip-10-0-1-108.ec2.internal:2181,ip-10-0 -1-74.ec2.internal:2181} kafka:
broker:
url: ${ip-10-0-1-108.ec2.internal:6667,ip-10-0-1-74.ec2.internal:6667} hdfs: namenode: url: ${ip-10-0-1-203.ec2.internal:8020} grok: path: temp: ./patterns/temp
default: /apps/metron/patterns storm:
ui:
url: ${ip-10-0-1-203.ec2.internal:8744} parser: script.path: /usr/hcp/1.1.0.0-71/metron/bin/start_parser_topology.sh enrichment:
script.path: /usr/hcp/1.1.0.0-71/metron/bin/start_enrichment_topology.sh indexing:
script.path: /usr/hcp/1.1.0.0-71/metron/bin/start_elasticsearch_topology.sh
... View more
03-30-2018
09:34 AM
@asubramanian/ @Girish N: I am facing the same issue ..."Session closed immediately". Would you please let me know how to sort out this issue and would you please share your deployment steps which you followed. I am using 0.4.1 metron version. Do i need to move on to 0.4.2 for maas to work?
... View more
05-25-2017
01:14 PM
Sir, while folloing the document i stuck over installation process of es,metron. after configuration of metron inside ambari-repository i move for metron and es installation of the nodes as recommended.But get failed with below exception: Ambari-console error: 2017-05-2516:33:01,138-Installingpackage elasticsearch-2.3.3('/usr/bin/yum -d 0 -e 0 -y install elasticsearch-2.3.3') 2017-05-2516:33:02,132-Execution of '/usr/bin/yum -d 0 -e 0 -y install elasticsearch-2.3.3' returned 1.Error:Cannot retrieve repository metadata (repomd.xml)for repository: METRON-0.4.0.Please verify its path andtry again 2017-05-2516:33:02,132-Failed to install package elasticsearch-2.3.3.Executing'/usr/bin/yum clean metadata' 2017-05-2516:33:02,497-Retrying to install package elasticsearch-2.3.3 after 30 seconds Command failed after 1 tries Terminal error: file:///localrepo/repodata/repomd.xml: [Errno 14] Could not open/read file:///localrepo/repodata/repomd.xml Error: Cannot retrieve repository metadata (repomd.xml) for repository: METRON-0.4.0. Please verify its path and try again
... View more