Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device status in DB #439

Open
pavkamlc opened this issue Nov 13, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@pavkamlc
Copy link

commented Nov 13, 2018

Hi,
Id like monitor gammu-smsd status by zabbix without agent. For this purpose I tried use odbc queries into gammu DB.
I create template with queries which check count of messages into queues int this template https://share.zabbix.com/atc/phones/gammu
But I have problem, when is my phone disconnected, queue is filling, but I cant resolve if queue is only longer, or is problem with device.
There in database I cant find any information about phone status. Is possible to read this info from DB? In log I see etc this "Going to 30 seconds sleep because of too many connection errors", but this don't inform into DB.

Regards...


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@melones

This comment has been minimized.

Copy link

commented Jan 3, 2019

You can use table phones for that.

In that table you have updated row with phone status. The row is updated according to StatusFrequency setting of gammu-smsdrc file.

Do something like this:
select UpdatedInDB from phones where ID="your_phone_id" order by UpdatedInDB DESC limit 1;

The SQL above will give you an information when phone status was last updated. If the SQL query result exceeds StatusFrequency setting, then you probably have a problem with phone status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.