AppD Archive

Custom Metrics not showing up in metric browser

CommunityUser
Splunk Employee
Splunk Employee

Hi,

We created a custom monitoring extension using shell script and below is what we output.

name=Custom Metrics|Server Monitors|Port Listening Status|Port1,value=1,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Port Listening Status|Port2,value=1,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Port Listening Status|Port3,value=1,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Mount Status,value=2,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Live Monitor|HTTP Status,value=200,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Live Monitor|Time Taken,value=2,aggregator=OBSERVATION,time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Agent Monitor|HTTP Status,value=200,aggregator=OBSERVATION, time-rollup=CURRENT,cluster-rollup=INDIVIDUAL
name=Custom Metrics|Server Monitors|Agent Monitor|Time Taken,value=55,aggregator=OBSERVATION,time-rollup=CURRENT,cluster-rollup=INDIVIDUAL

But these metrics are not getting displayed in the metric browser. We restarted the machine agents as well but that didnt help.

Script works fine when we run it through the command prompt. We checked the logs too but I dont see any errors or exceptions being thrown there.

Please help.

Thanks!

0 Karma
1 Solution

CommunityUser
Splunk Employee
Splunk Employee

There was an issue with a command in my script because of which metrics were not coming up. Fixed that and can see the metrics now.

Thanks Angela for looking into this.

View solution in original post

0 Karma

Angela_Lang
Path Finder

Could you please include the monitor.xml file you are using?

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Please see below.

<monitor>
<name>URLMonitor</name>
<type>managed</type>
<description>Monitors All Servers.
</description>
<monitor-configuration>
</monitor-configuration>
<monitor-run-task>
<execution-style>periodic</execution-style>
<name>Run</name>
<type>executable</type>
<execution-timeout-in-secs>60</execution-timeout-in-secs>
<task-arguments>
</task-arguments>
<executable-task>
<type>file</type>
<file os-type="linux">URLMonitor.sh</file>
</executable-task>
</monitor-run-task>
</monitor>

0 Karma

Angela_Lang
Path Finder

Have you checked that the subdirectory containing your script and monitor.xml files has read, write, and execute permissions and is in the Machine Agent's Monitors subdirectory? Also does the machine agent have execute permissons on the script file and the contents of the file?

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Yes. I have checked those and is properly set up. I can see the below in the machine agent logs as well.

[Agent-Scheduler-1] 21 Jan 2015 09:21:21,366 INFO ExecTask - Running Executable Command [[/data/Appdynamics/Machineagent/monitors/urlmonitors/URLMonitor.sh]]]
[Agent-Scheduler-1] 21 Jan 2015 09:21:21,369 INFO ExecTask - Started Executable Command [[/data/Appdynamics/Machineagent/monitors/urlmonitors/URLMonitor.sh]]

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

There was an issue with a command in my script because of which metrics were not coming up. Fixed that and can see the metrics now.

Thanks Angela for looking into this.

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...