-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jesús Ángel
authored
May 3, 2019
1 parent
aec0d94
commit f5ff889
Showing
268 changed files
with
43,326 additions
and
11,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Splunk app for Wazuh | ||
|
||
[![Slack](https://img.shields.io/badge/slack-join-blue.svg)](https://wazuh.com/community/join-us-on-slack/) | ||
[![Email](https://img.shields.io/badge/email-join-blue.svg)](https://groups.google.com/forum/#!forum/wazuh) | ||
[![Documentation](https://img.shields.io/badge/docs-view-green.svg)](https://documentation.wazuh.com) | ||
[![Documentation](https://img.shields.io/badge/web-view-green.svg)](https://wazuh.com) | ||
|
||
Wazuh app for Splunk offers an option to visualize _Wazuh Alerts_ and _API data_. Wazuh helps you to gain deeper security visibility into your infrastructure by monitoring hosts at an operating system and application level. | ||
* * * | ||
![](https://i.imgur.com/HkMjiwJ.png) | ||
### Documentation | ||
|
||
- [Wazuh app for Splunk installation guide](https://documentation.wazuh.com/current/installing-splunk/index.html) | ||
|
||
|
||
### Requisites | ||
1. An already installed Wazuh Manager with access to the API. | ||
2. __Splunk Universal Forwarder__ where Wazuh Manager is installed. | ||
3. At least one __Splunk Enterprise indexer__. | ||
|
||
## Installation | ||
|
||
| Splunk version | Wazuh version | Installation | | ||
| :------------: | :---------------: | :--------------------------------------------------------------------------------------------------------- | | ||
| 7.0.3 | 3.2.1 | <https://packages.wazuh.com/3.x/splunkapp/v3.2.1_7.0.3.tar.gz> | | ||
| 7.1.1 | 3.2.2 | <https://packages.wazuh.com/3.x/splunkapp/v3.2.2_7.1.1.tar.gz> | | ||
| 7.1.1 | 3.2.3 | <https://packages.wazuh.com/3.x/splunkapp/v3.2.3_7.1.1.tar.gz> | | ||
| 7.1.1 | 3.2.4 | <https://packages.wazuh.com/3.x/splunkapp/v3.2.4_7.1.1.tar.gz> | | ||
| 7.1.1 | 3.3.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.3.0_7.1.1.tar.gz> | | ||
| 7.1.1 | 3.3.1 | <https://packages.wazuh.com/3.x/splunkapp/v3.3.1_7.1.1.tar.gz> | | ||
| 7.1.2 | 3.4.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.4.0_7.1.2.tar.gz> | | ||
| 7.1.2 | 3.5.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.5.0_7.1.2.tar.gz> | | ||
| 7.1.2 | 3.6.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.6.0_7.1.2.tar.gz> | | ||
| 7.1.3 | 3.6.1 | <https://packages.wazuh.com/3.x/splunkapp/v3.6.1_7.1.3.tar.gz> | | ||
| 7.2.0 | 3.7.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.7.0_7.2.0.tar.gz> | | ||
| 7.2.1 | 3.7.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.7.0_7.2.1.tar.gz> | | ||
| 7.2.1 | 3.7.1 | <https://packages.wazuh.com/3.x/splunkapp/v3.7.1_7.2.1.tar.gz> | | ||
| 7.2.1 | 3.7.2 | <https://packages.wazuh.com/3.x/splunkapp/v3.7.2_7.2.1.tar.gz> | | ||
| 7.2.3 | 3.8.0 | <https://packages.wazuh.com/3.x/splunkapp/v3.8.0_7.2.3.tar.gz> | | ||
|
||
## Upgrade | ||
|
||
Remove the app using splunk plugin tool | ||
|
||
$SPLUNK_HOME/bin/splunk remove app SplunkAppForWazuh | ||
|
||
Install the app | ||
|
||
$SPLUNK_HOME/bin/splunk install app <last package file> | ||
|
||
## Contribute | ||
|
||
If you want to contribute to our project please don't hesitate to send a pull request. You can also join our users [mailing list](https://groups.google.com/d/forum/wazuh), by sending an email to <mailto:[email protected]>, to ask questions and participate in discussions. | ||
|
||
## Copyright & License | ||
|
||
Copyright (C) 2015-2019 Wazuh, Inc. | ||
|
||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. | ||
|
||
Find more information about this on the [LICENSE](LICENSE) file. | ||
|
||
## References | ||
|
||
- [Wazuh website](https://wazuh.com) | ||
- [Wazuh documentation](https://documentation.wazuh.com) | ||
- [Splunk documentation](http://docs.splunk.com/Documentation) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Wazuh app - API backend module. | ||
Copyright (C) 2015-2019 Wazuh, Inc. | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
Find more information about this on the LICENSE file. | ||
""" | ||
|
||
import jsonbak | ||
import splunk.appserver.mrsparkle.controllers as controllers | ||
from splunk.appserver.mrsparkle.lib.decorators import expose_page | ||
from db import database | ||
from log import log | ||
from jobs_queue import JobsQueue | ||
|
||
import time | ||
|
||
|
||
class Queue(controllers.BaseController): | ||
|
||
"""Queue class. | ||
Handle Jobs queue methods | ||
""" | ||
|
||
def __init__(self): | ||
"""Constructor.""" | ||
try: | ||
self.queue = JobsQueue() | ||
self.logger = log() | ||
controllers.BaseController.__init__(self) | ||
except Exception as e: | ||
self.logger.error( | ||
"Error in Jobs queue module constructor: %s" % (e)) | ||
|
||
@expose_page(must_login=False, methods=['POST']) | ||
def add_job(self, **kwargs): | ||
"""Add job to the queue. | ||
Parameters | ||
---------- | ||
kwargs : dict | ||
Request parameters | ||
""" | ||
try: | ||
now = time.time() | ||
exec_time = now + float(kwargs['delay']) | ||
del kwargs['delay'] | ||
job = {"job": kwargs, "added": now, "exec_time": exec_time, "done": 0} | ||
self.queue.insert_job(job) | ||
return jsonbak.dumps({"data": "Job added to the queue.", "error": 0}) | ||
except Exception as e: | ||
self.logger.error("Error adding job: %s" % (e)) | ||
return jsonbak.dumps({'error': str(e)}) |
Oops, something went wrong.