mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
OSX steps
This commit is contained in:
parent
183c0ec36b
commit
58a1bccb21
@ -77,7 +77,7 @@
|
||||
following
|
||||
command:</p>
|
||||
<div ng-show="registerObj.systems[0].steps[2].managerIp" class="wz-code-viewer">
|
||||
# sed -i 's/MANAGER_IP/{{registerObj.systems[0].steps[2].managerIp}}/g' /var/ossec/etc/ossec.conf
|
||||
sed -i 's/MANAGER_IP/{{registerObj.systems[0].steps[2].managerIp}}/g' /var/ossec/etc/ossec.conf
|
||||
</div>
|
||||
<md-button ng-show="registerObj.systems[0].steps[2].managerIp" class="wz-button btn height-40 next-btn"
|
||||
ng-click="nextStep()"><i class="fa fa-success"></i> Next
|
||||
@ -154,4 +154,68 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- OSX -->
|
||||
<div ng-if="registerObj.selectedSystem === 2">
|
||||
<div class="tutorial-step" ng-class="{'active' : registerObj.currentStep === 0, 'completed' : registerObj.currentStep > 0, 'disabled' : registerObj.currentStep < 0 }">
|
||||
<div layout="row" class="tutorial-header">
|
||||
<div class="step-number">
|
||||
<p>1</p>
|
||||
</div>
|
||||
<h3 class="step-title">{{registerObj.systems[2].steps[0].title}}</h3>
|
||||
</div>
|
||||
<div class="tutorial-body">
|
||||
<div class="wz-margin-bottom-10">
|
||||
<label class="euiFormLabel">Manager IP</label>
|
||||
<div class="euiFormControlLayout wz-margin-top-4">
|
||||
<div class="euiFormControlLayout__childrenWrapper">
|
||||
<input type="text" class="euiFieldText" aria-label="default columns" ng-model="registerObj.systems[2].steps[0].managerIp">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tutorial-exit" ng-show="registerObj.systems[2].steps[0].managerIp">Please execute the
|
||||
following
|
||||
command:</p>
|
||||
<div ng-show="registerObj.systems[2].steps[0].managerIp" class="wz-code-viewer">
|
||||
/Library/Ossec/bin/agent-auth -m {{registerObj.systems[2].steps[0].managerIp}}
|
||||
</div>
|
||||
<md-button ng-show="registerObj.systems[2].steps[0].managerIp" class="wz-button btn height-40 next-btn"
|
||||
ng-click="nextStep()"><i class="fa fa-success"></i> Next
|
||||
</md-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tutorial-step" ng-class="{'active' : registerObj.currentStep === 1, 'completed' : registerObj.currentStep > 1, 'disabled' : registerObj.currentStep < 1 }">
|
||||
<div layout="row" class="tutorial-header">
|
||||
<div class="step-number">
|
||||
<p>2</p>
|
||||
</div>
|
||||
<h3 class="step-title">{{registerObj.systems[2].steps[1].title}}</h3>
|
||||
</div>
|
||||
<div class="tutorial-body">
|
||||
<p class="tutorial-exit">Please execute the following command:</p>
|
||||
<div class="wz-code-viewer">sed -i '' -e 's/MANAGER_IP/{{registerObj.systems[2].steps[0].managerIp}}/g'
|
||||
/Library/Ossec/etc/ossec.conf</div>
|
||||
<md-button class="wz-button btn height-40 next-btn" ng-click="nextStep()"><i class="fa fa-success"></i>
|
||||
Next
|
||||
</md-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tutorial-step" ng-class="{'active' : registerObj.currentStep === 2, 'completed' : registerObj.currentStep > 2, 'disabled' : registerObj.currentStep < 2 }">
|
||||
<div layout="row" class="tutorial-header">
|
||||
<div class="step-number">
|
||||
<p>3</p>
|
||||
</div>
|
||||
<h3 class="step-title">{{registerObj.systems[2].steps[2].title}}</h3>
|
||||
</div>
|
||||
<div class="tutorial-body">
|
||||
<p class="tutorial-exit">Please execute the following command:</p>
|
||||
<div class="wz-code-viewer">
|
||||
{{registerObj.systems[2].steps[2].code}}
|
||||
</div>
|
||||
<md-button class="wz-button btn height-40 next-btn" ng-click="nextStep()"><i class="fa fa-success"></i>
|
||||
Next
|
||||
</md-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -36,14 +36,14 @@ class WzRegisterAgents {
|
||||
currentStep: 0,
|
||||
systems: [
|
||||
{
|
||||
/* linux */
|
||||
/* Linux */
|
||||
steps: [
|
||||
{
|
||||
title: 'Add the agent to the manager'
|
||||
},
|
||||
{
|
||||
title: 'Import the key to the agent',
|
||||
code: '# /var/ossec/bin/manage_agents -i '
|
||||
code: '/var/ossec/bin/manage_agents -i '
|
||||
},
|
||||
{
|
||||
title:
|
||||
@ -55,12 +55,28 @@ class WzRegisterAgents {
|
||||
]
|
||||
},
|
||||
{
|
||||
/* windows */
|
||||
/* Windows */
|
||||
steps: [
|
||||
{
|
||||
title: 'Register the agent'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
/* OSX */
|
||||
steps: [
|
||||
{
|
||||
title: 'Register the agent'
|
||||
},
|
||||
{
|
||||
title:
|
||||
'Edit the Wazuh agent configuration to add the Wazuh manager IP'
|
||||
},
|
||||
{
|
||||
title: 'Restart the agent',
|
||||
code: '/Library/Ossec/bin/ossec-control restart'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -110,6 +126,7 @@ class WzRegisterAgents {
|
||||
$scope.addingAgent = false;
|
||||
errorHandler.handle(error, 'Adding agent error');
|
||||
}
|
||||
$scope.$applyAsync();
|
||||
return;
|
||||
};
|
||||
|
||||
@ -119,8 +136,8 @@ class WzRegisterAgents {
|
||||
const data = await apiReq.request(
|
||||
'PUT',
|
||||
`/agents/${
|
||||
$scope.registerObj.systems[$scope.registerObj.selectedSystem]
|
||||
.steps[3].id
|
||||
$scope.registerObj.systems[$scope.registerObj.selectedSystem]
|
||||
.steps[3].id
|
||||
}/restart`,
|
||||
{}
|
||||
);
|
||||
@ -130,8 +147,8 @@ class WzRegisterAgents {
|
||||
}
|
||||
errorHandler.info(
|
||||
`Success. Agent ${
|
||||
$scope.registerObj.systems[$scope.registerObj.selectedSystem]
|
||||
.steps[0].agentName
|
||||
$scope.registerObj.systems[$scope.registerObj.selectedSystem]
|
||||
.steps[0].agentName
|
||||
} has been registered.`
|
||||
);
|
||||
$scope.nextStep();
|
||||
|
Loading…
Reference in New Issue
Block a user