You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure部署ElasticSearch后Logstash相关运维问题咨询

Answers to Your Logstash & Azure Elasticsearch Questions

Hey there, let's break down all your questions step by step based on your Azure Marketplace-deployed Elasticsearch setup:

1. Which VM is Logstash running on?

Azure Marketplace's Elasticsearch template typically deploys VMs with distinct roles: master nodes (cluster management), data nodes (index storage), and client nodes (request handling, which also hosts Kibana).

Since you can access Kibana at http://ipaddress:5601 and your cluster info shows a node named myesclient-1, Logstash (if deployed alongside the template) is almost certainly running on this client node VM (the same one hosting Kibana). To confirm:

  • Check your Azure Resource Group's VM list for a VM with client in its name
  • Remote into the VM and verify Logstash processes via Task Manager or command line (tasklist | findstr logstash)

2. How to start Logstash?

There are two common ways depending on your setup:

  • As a Windows Service: If Logstash was deployed with the Azure template, it's likely set up as a Windows service. Open services.msc, find the "Logstash" service, then click "Start" or "Restart".
  • Manual Command Line/BAT File: If you're running it manually, use the command sequence you shared, or run directly in Command Prompt:
    cd C:\logstash\logstash-6.2.2\bin
    logstash -f [full-path-to-your-config-file]
    
    Note: Make sure Java 8 is installed and configured in your system environment variables (Logstash 6.2.x requires JDK 8).

3. Where to store Logstash config files & JDBC configs?

For better manageability and security, follow these guidelines:

  • Core Logstash Config: Store logstash.yml (the main config file) in the config folder of your Logstash installation directory, e.g., C:\logstash\logstash-6.2.2\config.
  • JDBC Config Files: Create a dedicated, accessible directory like C:\logstash\configs\jdbc to store your jdbc.config file. Avoid storing configs in user-specific folders (like your desktop example) — if Logstash runs as a service, it may not have permission to access user desktop directories.

4. How to run the BAT file periodically?

To automate your BAT file on a schedule, use Windows Task Scheduler:

  1. Open Task Scheduler and click "Create Basic Task".
  2. Name your task (e.g., "Logstash JDBC Sync") and add a description, then click "Next".
  3. Choose your trigger frequency (daily, weekly, etc.) and set the exact time, then click "Next".
  4. Select "Start a program" as the action, then click "Next".
  5. Browse to your BAT file's full path (e.g., C:\logstash\scripts\run-logstash.bat) and optionally set the "Start in" field to the BAT file's directory to avoid path issues.
  6. Click "Finish", then tweak the task properties for better reliability:
    • Check "Run whether user is logged on or not" to run it in the background.
    • Check "Run with highest privileges" to ensure Logstash has access to all required resources.

Example BAT File Syntax (Optimized for Scheduled Tasks)

@echo off
cd C:\logstash\logstash-6.2.2\bin
logstash -f C:\logstash\configs\jdbc\jdbc.config
rem Remove the "pause" line if running via Task Scheduler — it will cause the process to hang indefinitely

内容的提问来源于stack exchange,提问作者Basudeb Banerjee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 09:05:24