Difference between revisions of "Tanium Custom Sensors"

From RiceFamily Wiki
Jump to: navigation, search
(Current Items)
 
Line 37: Line 37:
 
* Patch Window
 
* Patch Window
 
* Support Group
 
* Support Group
* [Serial Number with ability to Override]
+
* [[Serial Number with ability to Override]]
  
  

Latest revision as of 16:58, 29 May 2025

Tanium Sensors are how we pull data back about Endpoints.

They can be written with VBS, PowerShell or Python.

Python works on both Windows, Linux, and Mac so it is the preferred method of writing Custom Sensors.

Links


Python Executable path : C:\Program Files (x86)\Tanium\Tanium Client\TPython312\TPython.bat

Python Executables : ``C:\Program Files (x86)\Tanium\Tanium Client\python312``

Current release of Python used in Tanium : 3.1.2


 "exec" "env" "TANIUM_SENSOR=1" "'pwd'/'if [ -f TPython ]; then echo TPython/TPython; else echo python27/python; fi'" "$0" "$@"
 inport tanium
 import tanium.host
 
 SENSOR_DELIMITER = '|'
 
 def do_stuff():
 	comp_name = tanium.host.get_hostname()
 	answer = "{hello}{sep}{name}.format(hello="Hello", sep=SENSOR_DELIMETER, name=comp_name)
 	tanium.results.add(answer)
 	
 try:
 	do_stuff()
 except Exception as e:
 	tanium.results.add("Error executing sensor: {}".format(e))

Current Items