Unable to start kibana from ansible playbook

98 views
Skip to first unread message

Sanjay Khatri

unread,
Mar 3, 2022, 12:50:05 PM3/3/22
to Ansible Project

Start command nohup ./bin/kibana > /dev/null 2>&1 &

After execute this command have to check kibana running mode

ps aux | grep node/bin/node

If i am running manually this command it is working fine but running from ansible playbook it is not working. Please help me.

Thanks in Advance...!!!




dulh...@mailbox.org

unread,
Mar 3, 2022, 2:47:12 PM3/3/22
to ansible...@googlegroups.com

showing your TASK may be helpful in order to get some feedback

dmc...@gmail.com

unread,
Mar 4, 2022, 12:05:22 PM3/4/22
to Ansible Project
Hi,

For my ELK role I created a service each for elasticsearch, kibana and logstash. It just makes it easier to start and stop the ELK stack components and you can enable them at boot. You can see the role I created here with all the code:
https://github.com/dmccuk/ansible_ELK/blob/master/roles/elk_config/tasks/kibana.yml

Dhiraj Harshe

unread,
Mar 4, 2022, 1:02:10 PM3/4/22
to ansible...@googlegroups.com

Have you tried below command in playbook ?


tasks:

  - shell: ps aux | grep node/bin/node

     register: ps_cmd

   - name: Show captured processes

      debug:

         var: ps_cmd.stdout



:


On Thu, Mar 3, 2022 at 11:47 AM dulhaver via Ansible Project <ansible...@googlegroups.com> wrote:

showing your TASK may be helpful in order to get some feedback


On 03.03.22 04:36, Sanjay Khatri wrote:

Start command nohup ./bin/kibana > /dev/null 2>&1 &

After execute this command have to check kibana running ps aux | grep node/bin/node
If i am running manually this command it is working fine but running from ansible playbook it is not working. Please help me.

Thanks in Advance...!!!

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/72c4fea6-cad6-e943-5942-c9da078e9914%40mailbox.org.
--
Sent from my iPhone

Roland Müller

unread,
Mar 7, 2022, 2:53:07 AM3/7/22
to Ansible Project
Hello,


your role uses systemd. Therefore, may be the best solution should be to have the check whether service is running in systemd service rather than in Ansible. On Ansible side then one would use only the service and systemd modules.

The following gist  uses PIDFile definition by googling. 

...
[Service]
PIDFile=/var/run/kibana.pid

BR,
Roland
 

Roland Müller

unread,
Mar 7, 2022, 2:55:17 AM3/7/22
to Ansible Project
Some editing error in my previous message:

The following gist  that I found by googling uses PIDFile definition .
Reply all
Reply to author
Forward
0 new messages