pidof: invalid options on command line!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

pidof: invalid options on command line!

Post by benhank »

OK i have a fresh clean machine and I have snmp set up. no scratch that...i have it installed...hmmmm. I have what may or may not be snmptt located in my Linux's internal command structure.
I get none of my previous errors but I do get this one:

Code: Select all

 Stopping snmptrapd:  [FAILED] (in capital red letters too :cry: 
 pidof: invalid options on command line! 
Tried to look the error up on google, but all it returned was the words "hahahahahaha" on my screen.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: snmptt home stretch

Post by BanditBBS »

benhank wrote:OK i have a fresh clean machine and I have snmp set up. no scratch that...i have it installed...hmmmm. I have what may or may not be snmptt located in my Linux's internal command structure.
I get none of my previous errors but I do get this one:

Code: Select all

 Stopping snmptrapd:  [FAILED] (in capital red letters too :cry: 
 pidof: invalid options on command line! 
Tried to look the error up on google, but all it returned was the words "hahahahahaha" on my screen.
smptrapd is a completely different app from snmptt. Both are needed for what you are wanting to do. snmptrapd receives the traps and forwards them to snmptt which then calls a python script that manipulates the data and sends it to Nagios.

I got no help for you, just saying good luck! I just had to respond, to make sure you understood the order of things and to say thanks for the laugh yet again.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: snmptt home stretch

Post by BanditBBS »

Scratch my no help....just in case this may help: https://bugzilla.redhat.com/show_bug.cgi?id=170928

Same error message, unrelated problem, but may point you towards the issue.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: snmptt home stretch

Post by sreinhardt »

snmptt 1.3 or 1.4? although as a side note, I have run both and never noticed this issue before, hopefully because the bug is from 2005. Doesn't mean something similar is not still happening with snmptt. Also was the service started when you stopped it?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: snmptt home stretch

Post by benhank »

the bad snmp not working still
getting the:

Code: Select all

MIB could not be installed - directory permissions may be incorrect.
BUUUT:
good news! NAILED that filthy soB(iscuit). KaPOW! Ever saw that scene in Sin City in which Bruce Willis has his final"conversation' with the yellow guy? Well that me on this pid ish:

the short answer: for some reason after my fresh install of snmptt the following was wrong in

Code: Select all

/etc/rc.d/init.d/snmptrapd
At lines 29 and 51:

Code: Select all

OPTIONS="-Lsd -On -p /var/run/snmptrapd.pid"
should read:

Code: Select all

OPTIONS="-Lsd -p /var/run/snmptrapd.pid"
remove "-On" and it worked.

Spence could you rename my topic to:

Code: Select all

pidof: invalid options on command line! 
maybe it will help someone else.

--------------------------------------------------------------------------------------------
Hey BanditBBS , I have to disagree with you on that one, snmpXXXXXX do not differ, they all <censored><censored><censored><censored><censored><BLEEP><BLEEP><censored><censored> AND <censored><BLEEP><untranslatable>!
Ahhh I feel so light and clean now !

But seriously thanks for the assist and helpful intent on your part man.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: pidof: invalid options on command line!

Post by sreinhardt »

Changed and WOW, that is strange. I will have to look into those flags at some point and see what the deal is. So, how are we doing at this point.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: pidof: invalid options on command line!

Post by benhank »

check yah pm bro, but in a nutshell, I think I am stuck in a permissions issue like last time but THIS time the machine is brand spanking new, so I don't think that other crap will come into play. I pm'med you some files.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: pidof: invalid options on command line!

Post by sreinhardt »

OK, since I got things working for myself this weekend, here are the commands I ran.

Code: Select all

chown root.nagios /etc/snmp/snmptt.ini /etc/snmp /usr/share/snmp/mibs/
chown snmptt.snmptt /var/log/snmptt /var/spool/snmptt
Otherwise for a quick glance, your configs look good. One thing to note that I found, the addmib, snmptrapconvert, and snmptraphandler.py are NOT included in v1.4 if you need the binaries I can share them. they will work on both x86 and x64 without issue.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: pidof: invalid options on command line!

Post by benhank »

ok I am excited now!
those two commands didnt work, but then I remembered how you fixed my OTHER server. I logged onto is did a history and found this command that you used:

Code: Select all

chmod -R 777 /usr/share/snmp/
.
Ran it and now I can upload mibs from the interface!

still not relieving them but I know we are like >.< close!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: pidof: invalid options on command line!

Post by abrist »

What are the last remaining issues good sir?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked