Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. # $1 = kibana_ip
  2. # $2 = kibana_puerto
  3. die() { echo "$*" 1>&2 ; exit 1; }
  4. returnRoot () { cd /usr/share/kibana; }
  5. if [ "$#" -eq "0" ] || ["$#" -eq "1"]; then
  6. echo "Error, faltan argumentos"
  7. echo "Ejemplo: ./setupKibana.sh <kibana_ip> <kibana_puerto>"
  8. die "Saliendo"
  9. else
  10. #BASE
  11. echo "Instalando base"
  12. returnRoot
  13. yum install -y sudo git gcc-c++ make */ss net-tools
  14. curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
  15. yum install -y nodejs
  16. npm install -g bower
  17. #TIMEPICKER
  18. echo "Instalando timepicker"
  19. returnRoot
  20. cd plugins
  21. git clone https://github.com/nreese/kibana-time-plugin.git
  22. cd kibana-time-plugin
  23. bower install --allow-root
  24. echo "{" > package.json
  25. echo " \"name\": \"kibana-time-plugin\"," >> package.json
  26. echo " \"version\": \"6.2.2\"" >> package.json
  27. echo "}" >> package.json
  28. #SENTINL
  29. echo "Instalando Sentinl"
  30. returnRoot
  31. /opt/kibana/bin/kibana-plugin install https://github.com/sirensolutions/sentinl/releases/download/tag-6.2.2/sentinl-v6.2.2.zip
  32. cd config
  33. rm kibana.yml
  34. echo "server.name: kibana" > kibana.yml
  35. echo "server.host: '0'" >> kibana.yml
  36. echo "elasticsearch.url: http://$1:$2 " >> kibana.yml
  37. echo "elasticsearch.username: elastic" >> kibana.yml
  38. echo "elasticsearch.password: changeme" >> kibana.yml
  39. echo "xpack.monitoring.ui.container.elasticsearch.enabled: true" >> kibana.yml
  40. echo "xpack.security.enabled: false" >> kibana.yml
  41. echo "sentinl:" >> kibana.yml
  42. echo " settings:" >> kibana.yml
  43. echo " es:" >> kibana.yml
  44. echo " host: $1" >> kibana.yml
  45. echo " port: $2" >> kibana.yml
  46. echo " email:" >> kibana.yml
  47. echo " active: true" >> kibana.yml
  48. echo " host: localhost " >> kibana.yml
  49. echo " report:" >> kibana.yml
  50. echo " active: true" >> kibana.yml
  51. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement