Guest User

scriptKibana.sh

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