Member since
07-14-2016
215
Posts
45
Kudos Received
16
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2220 | 12-13-2018 05:01 PM | |
5002 | 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 |
03-28-2018
06:25 AM
Can you post the version of python-requests you have installed? pip list | grep requests
... View more
03-27-2018
06:57 AM
@Bramantya Anggriawan
You need to look for the indexing logs under the storm worker logs. There are two topologies that run as a part of the Metron Indexing service--random_access_indexing and batch_indexing. You can view the respective logs under /var/log/storm/worker-logs/<indexing-topo-name>/6700/worker.log .
Btw, I would also suggest that you look at the Ambari agent log for any errors. I have seen earlier that the indexing service appearing stopped could possibly be an issue with python-requests package not installed as well (see https://issues.apache.org/jira/browse/METRON-1451).
... View more
03-26-2018
07:38 AM
Sure.. refer to these steps for creating the table and adding the user. https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.4.1/bk_installation/content/installing_rest_app_manually.html
... View more
03-26-2018
05:18 AM
Hello @Wang Ao, can you check in Ambari (Services -> Metron -> Configs -> REST) that the Metron REST settings are properly configured? Here's an example that you can use: Metron JDBC Driver = org.h2.Driver
Metron JDBC password = root
Metron JDBC platform = h2
Metron JDBC URL = jdbc:h2:file:~/metrondb
Metron JDBC username = root
Active Spring profiles = dev
... View more
03-20-2018
05:11 AM
Btw, I wonder why you are seeing the 'No such file or directory' error if your installation went through fine. Are you able to see the file /usr/hcp/1.4.1.0-18/metron/config/zookeeper in your metron node?
Can you describe your installation procedure in detail please?
... View more
03-20-2018
05:08 AM
@Bramantya Anggriawan You can find out the Zookeeper details from the Ambari UI... see screenshot below. And then you can form the zookeeper quorum for e.g. as: host1.mydomain:2181,host2.mydomain:2181
... View more
01-04-2018
06:17 AM
@Gaurav Bapat, can you please create a separate question with more details, error logs and screenshots, since it is not a good practice to post an entirely different question on a topic. This question is related to docker and RPMs. If you have anything to ask or share related to this topic, please do.
... View more
01-04-2018
05:57 AM
Hi @Muslum, Can you check if Docker is up and running on your box, since it is required for building the RPMs? Once you have confirmed, then you can run the following to generate the RPMs. cd metron-deployment
mvn clean package -Pbuild-rpms
... View more
12-18-2017
10:55 AM
This looks like a defect. I have created METRON-1369 to track this.
... View more
12-14-2017
10:33 AM
Hmm... this seems about right to me. It should be working, in principle. In my environment, I have seen snort alerts working readily. Can you try ingesting the following sample messages into the 'snort' kafka topic and check if you are able to see them in the UI? I would like to see if this works for you, and to ascertain if it is an issue with 'squid' only. 09/09/16-09:09:09.844676 ,1,999158,0,"snort test alert",TCP,192.168.138.158,49188,62.75.195.236,80,00:00:00:00:00:00,00:00:00:00:00:00,0x3C,***A****,0xF017C4DA,0xABDB8426,,0xF6C9,128,0,2319,40,40960,,,,
... View more
12-14-2017
09:51 AM
Can you paste the output when you open 'http://<es-master-node>:9200/squid*/_mappings' ?
... 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-14-2017
04:46 AM
@jnarayanan You might be running into METRON-1283, which is fixed in more recent versions of HCP. You can confirm as follows - Go to http://<es-master-node>:9200/squid*/_mappings, and look for an "alerts" field. If you are missing this field from the mapping, then it is likely the reason for Alerts UI to be empty. In order to fix the issue, follow these steps: * Clear all existing Elasticsearch indices * Go to Ambari UI -> Services -> Metron -> 'Service Actions' dropdown -> Elasticsearch Template Install * Re-ingest data into 'squid' telemetry. And you should now be able to see entries in the Alerts UI.
... View more
12-06-2017
07:53 AM
@Gaurav Bapat
1 -> You can do vagrant halt command (from the folder metron/metron-deployment/vagrant/full-dev-platform ) in order to gracefully power down the VM 2 -> Can you do vagrant ssh<code> into the full dev VM and check <code>/var/log/messages to see if you are seeing any issues? I have seen these issues when the system resources are starved.
You can also try increasing the VM system resources by modifying the memory and cpu fields in metron/metron-deployment/vagrant/full-dev-platform/Vagrantfile , under this section
hosts = [{
hostname: "node1",
ip: "192.168.66.121",
memory: "8192",
cpus: 4,
promisc: 2 # enables promisc on the 'Nth' network interface
}]
3 -> For adding NiFi, you can follow the below links to have NiFi running and configured, It is recommended to use a separate cluster, since the vagrant full dev Metron platform will not suffice.
Check out more details on the following links:
https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.0.1.1/bk_command-line-installation/content/ch_HDF_installing.html You can also follow the HCP runbook here to know more:
https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.1/bk_runbook/content/install_nifi_runbook.html 4 -> This could be a problem of #2 above. Pls check the logs on the VM.
... View more
12-01-2017
04:07 PM
Hey @Girish N, I saw the same issue with model name and URL not listed with the -mo LIST command. I had to destroy the VM and re-deploy in order to get it working. From the ResourceManager UI, I see the MaaS service is running, but the allocated memory is more than the one specified from the maas deploy command. Hm.. I am not sure about this.
... View more
12-01-2017
08:38 AM
I would recommend increasing to 16 GB RAM since you seem to be having issues with 13 GB.
... View more
11-30-2017
12:59 PM
@Gaurav Bapat is this on the new setup with increased RAM ?
... View more
11-30-2017
11:01 AM
You will have to discard the existing VM and build another afresh on the new system with higher system configuration.
... View more
11-30-2017
10:29 AM
I would suggest that you try to find a machine with higher CPU and RAM (13 GB might not be sufficient) so that there is no resource constraints.
... View more
11-30-2017
10:21 AM
1 Kudo
Hey
@Gaurav Bapat, looks like a resource issue to me. Can you vagrant ssh into the box and see if ambari-server is running using the command ambari-server status ? If it is running, then from browser launch Ambari UI http://node1:8080 and you will be able to see the different service status. If many of the services are showing as red or not running, then it is apparent that you might be hitting the system limits.
I would suggest that you try to find a machine with higher CPU and RAM (13 GB might not be sufficient) so that there is no resource constraints.
... View more
11-29-2017
05:06 AM
1 Kudo
This is where the crux of the whole deployment happens - Ambari first installs all the services, and then starts them.
... View more
11-29-2017
04:53 AM
@Gaurav Bapat 1) For the multinode install, I would recommend that you try to setup HCP by following the documentation at: https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.1/bk_installation/content/installation_info_roadmap.html 2) For the Ambari going down, you need NOT do 'vagrant up' every time. Ambari dying out probably indicates that you are having a resource crunch on the VM. In order to bring up Ambari, you can follow these steps: cd metron-deployment/vagrant/full-dev-platform
vagrant ssh
sudo ambari-server status #To find out current status of service
sudo ambari-server start #To start in case the service is stopped Cheers, Anand
... View more
11-28-2017
09:05 AM
1 Kudo
You are welcome! 🙂 Yes, 16 GB is definitely better @Gaurav Bapat. Yup, more the processing, you will see better results.
... View more
11-28-2017
09:01 AM
@Girish N, I was able to fire up a full dev environment, follow through the steps at: https://github.com/apache/metron/tree/master/metron-analytics/metron-maas-service#example And I was able to get Mock DGA model working. I created a HCC article with the steps I followed to get it working on a full dev platform. Please see if it helps: https://community.hortonworks.com/articles/149376/metron-model-as-a-service-maas-full-dev-platform.html
... 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:
11-28-2017
06:37 AM
1 Kudo
Please click on the link as highlighted below.... to see the service logs Also, from your 2nd screenshot I can see that there was a timeout because of which the script was killed. This could be due to resource constraints on your system. I would recommend that you find a system with a better configuration and try deploying Metron there.
... View more
11-28-2017
06:19 AM
1 Kudo
@Gaurav Bapat, it looks like the installation was successful, but the components did not start. Can you check on what is the error from the Ambari UI ? To do this, click the below icon in Ambari UI: Then go to "Start Components on node1" and drill down to find out more.
... View more
11-28-2017
05:39 AM
Hm.. looks like your system is having a resource crunch. You need not do vagrant provision always.
... View more
11-28-2017
05:38 AM
The lag is expected since Metron creates substantial load on the system. Sure, if you can get another system with beefier system configuration that will definitely help.
... View more
11-27-2017
05:03 PM
Here are the Ambari 2.6.0.0 repositories: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-installation/content/ambari_repositories.html
... View more